From 694193fa3eeada9388d68be521822ecf4f659bd4 Mon Sep 17 00:00:00 2001 From: IndusAryan <125901294+IndusAryan@users.noreply.github.com> Date: Mon, 15 Jul 2024 20:40:41 +0530 Subject: [PATCH] refactor(fix): result sync, fix slider theme and trailer fix (#1187) --- app/build.gradle.kts | 24 +- app/src/main/res/layout/result_sync.xml | 397 ++++++++++-------------- 2 files changed, 168 insertions(+), 253 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index ebefa0ea..6e439d53 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -157,16 +157,16 @@ dependencies { testImplementation("junit:junit:4.13.2") testImplementation("org.json:json:20240303") androidTestImplementation("androidx.test:core") - implementation("androidx.test.ext:junit-ktx:1.1.5") - androidTestImplementation("androidx.test.ext:junit:1.1.5") - androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") + implementation("androidx.test.ext:junit-ktx:1.2.1") + androidTestImplementation("androidx.test.ext:junit:1.2.1") + androidTestImplementation("androidx.test.espresso:espresso-core:3.6.1") // Android Core & Lifecycle implementation("androidx.core:core-ktx:1.13.1") implementation("androidx.appcompat:appcompat:1.7.0") implementation("androidx.navigation:navigation-ui-ktx:2.7.7") - implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.8.2") - implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.2") + implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.8.3") + implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.3") implementation("androidx.navigation:navigation-fragment-ktx:2.7.7") // Design & UI @@ -182,9 +182,9 @@ dependencies { implementation("com.github.bumptech.glide:okhttp3-integration:4.16.0") // For KSP -> Official Annotation Processors are Not Yet Supported for KSP - ksp("dev.zacsweers.autoservice:auto-service-ksp:1.1.0") - implementation("com.google.guava:guava:33.2.0-android") - implementation("dev.zacsweers.autoservice:auto-service-ksp:1.1.0") + ksp("dev.zacsweers.autoservice:auto-service-ksp:1.2.0") + implementation("com.google.guava:guava:33.2.1-android") + implementation("dev.zacsweers.autoservice:auto-service-ksp:1.2.0") // Media 3 (ExoPlayer) implementation("androidx.media3:media3-ui:1.1.1") @@ -200,9 +200,9 @@ dependencies { // PlayBack implementation("com.jaredrummler:colorpicker:1.1.0") // Subtitle Color Picker implementation("com.github.recloudstream:media-ffmpeg:1.1.0") // Custom FF-MPEG Lib for Audio Codecs - implementation("com.github.teamnewpipe:NewPipeExtractor:fafd471") /* For Trailers + implementation("com.github.teamnewpipe:NewPipeExtractor:592f159") /* For Trailers ^ Update to Latest Commits if Trailers Misbehave, github.com/TeamNewPipe/NewPipeExtractor/commits/dev */ - implementation("com.github.albfernandez:juniversalchardet:2.4.0") // Subtitle Decoding + implementation("com.github.albfernandez:juniversalchardet:2.5.0") // Subtitle Decoding // Crash Reports (AcraApplication.kt) implementation("ch.acra:acra-core:5.11.3") @@ -215,14 +215,14 @@ dependencies { implementation("com.github.discord:OverlappingPanels:0.1.5") // Gestures implementation ("androidx.biometric:biometric:1.2.0-alpha05") // Fingerprint Authentication implementation("com.github.rubensousa:previewseekbar-media3:1.1.1.0") // SeekBar Preview - implementation("io.github.g0dkar:qrcode-kotlin:4.1.1") // QR code for PIN Auth on TV + implementation("io.github.g0dkar:qrcode-kotlin:4.2.0") // QR code for PIN Auth on TV // Extensions & Other Libs implementation("org.mozilla:rhino:1.7.15") // run JavaScript implementation("me.xdrop:fuzzywuzzy:1.4.0") // Library/Ext Searching with Levenshtein Distance implementation("com.github.LagradOst:SafeFile:0.0.6") // To Prevent the URI File Fu*kery implementation("org.conscrypt:conscrypt-android:2.5.2") // To Fix SSL Fu*kery on Android 9 - implementation("com.uwetrottmann.tmdb2:tmdb-java:2.10.0") // TMDB API v3 Wrapper Made with RetroFit + implementation("com.uwetrottmann.tmdb2:tmdb-java:2.11.0") // TMDB API v3 Wrapper Made with RetroFit coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.4") implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.13.1") /* JSON Parser ^ Don't Bump Jackson above 2.13.1 , Crashes on Android TV's and FireSticks that have Min API diff --git a/app/src/main/res/layout/result_sync.xml b/app/src/main/res/layout/result_sync.xml index 9cde195c..8b7b33c0 100644 --- a/app/src/main/res/layout/result_sync.xml +++ b/app/src/main/res/layout/result_sync.xml @@ -1,306 +1,221 @@ + android:layout_width="match_parent" + android:layout_height="match_parent"> + android:id="@+id/result_sync_holder" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:padding="16dp" + android:visibility="gone" + tools:visibility="visible"> + + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical"> + android:id="@+id/result_sync_names" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginBottom="10dp" + android:text="MyAnimeList, AniList" + android:textSize="16sp" + android:textStyle="bold" /> + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:visibility="visible"> + android:id="@+id/result_sync_sub_episode" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="end|center_vertical" + android:background="?android:attr/selectableItemBackgroundBorderless" + android:padding="10dp" + android:src="@drawable/baseline_remove_24" + app:tint="?attr/textColor" /> + android:id="@+id/result_sync_current_episodes" + style="@style/AppEditStyle" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:inputType="number" + android:textColorHint="?attr/grayTextColor" + android:textSize="20sp" + tools:hint="20" + tools:ignore="LabelFor" /> + android:id="@+id/result_sync_max_episodes" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + android:paddingBottom="1dp" + android:textColor="?attr/textColor" + android:textSize="20sp" + tools:text="30" /> + android:id="@+id/result_sync_add_episode" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="end|center_vertical" + android:background="?android:attr/selectableItemBackgroundBorderless" + android:padding="10dp" + android:src="@drawable/ic_baseline_add_24" + app:tint="?attr/textColor" /> - - + android:id="@+id/result_sync_episodes" + style="?android:attr/progressBarStyleHorizontal" + android:layout_width="match_parent" + android:layout_height="20dp" + android:layout_gravity="end|center_vertical" + android:indeterminate="false" + android:max="100" + android:padding="10dp" + android:progress="0" + android:progressBackgroundTint="?attr/colorPrimary" + tools:visibility="visible" /> + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal"> + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + android:padding="10dp" + android:text="@string/sync_score" + android:textColor="?attr/textColor" + android:textSize="17sp" /> + style="@style/BlackButton" + android:layout_width="wrap_content" + android:layout_height="30dp" + android:layout_gravity="center_vertical" + android:layout_marginStart="0dp" + android:minWidth="0dp" + android:text="7/10" /> + android:id="@+id/result_sync_rating" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="-5dp" + android:layout_marginEnd="-5dp" + app:thumbHeight="20dp" + android:stepSize="1" + android:value="4" + android:valueFrom="0" + android:valueTo="10" + app:labelStyle="@style/BlackLabel" + app:thumbRadius="10dp" + app:tickVisible="false" /> + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:paddingTop="12dp" + android:paddingBottom="12dp" + android:visibility="gone"> + android:id="@+id/home_parent_item_title" + style="@style/WatchHeaderText" + tools:text="Recommended" /> + android:layout_width="30dp" + android:layout_height="match_parent" + android:layout_gravity="end|center_vertical" + android:layout_marginEnd="5dp" + android:contentDescription="@string/home_more_info" + android:src="@drawable/ic_baseline_arrow_forward_24" + app:tint="?attr/textColor" /> + android:id="@+id/result_sync_check" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_rowWeight="1" + tools:listitem="@layout/sort_bottom_single_choice" /> + style="@style/WhiteButton" + android:layout_width="match_parent" + android:layout_marginTop="10dp" + android:text="@string/type_watching" + android:visibility="gone" /> + android:id="@+id/result_sync_set_score" + style="@style/BlackButton" + android:layout_width="match_parent" + android:layout_marginTop="10dp" + android:text="@string/upload_sync" + app:icon="@drawable/baseline_sync_24" /> + android:id="@+id/result_sync_loading_shimmer" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_gravity="center" + android:orientation="vertical" + android:padding="15dp" + app:shimmer_auto_start="true" + app:shimmer_base_alpha="0.2" + app:shimmer_duration="@integer/loading_time" + app:shimmer_highlight_alpha="0.3" + tools:visibility="gone" + tools:ignore="MissingClass"> + + - - + android:layout_height="30dp" /> + android:layout_width="match_parent" + android:layout_height="30dp" /> + android:layout_width="match_parent" + android:layout_height="30dp" /> @@ -313,8 +228,8 @@ + android:layout_width="match_parent" + android:layout_height="30dp" />