From b1040f05f238bfa0097c6d2d113f385597734309 Mon Sep 17 00:00:00 2001
From: Tule Simon <58936865+TuleSimon@users.noreply.github.com>
Date: Sun, 16 Apr 2023 14:49:05 +0100
Subject: [PATCH 01/11] migrating project level build.gradle
---
app/build.gradle | 2 +-
build.gradle | 18 +++++-------------
gradle/libs.versions.toml | 29 +++++++++++++++++++++++++++++
3 files changed, 35 insertions(+), 14 deletions(-)
create mode 100644 gradle/libs.versions.toml
diff --git a/app/build.gradle b/app/build.gradle
index d476684ca..d79216ac4 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -100,7 +100,7 @@ static def getProperty(Properties properties, String name) {
dependencies {
implementation project(':appthemehelper')
- implementation "androidx.gridlayout:gridlayout:1.0.0"
+ implementation(libs.gridLayout)
implementation "androidx.appcompat:appcompat:$appcompat_version"
implementation 'androidx.annotation:annotation:1.6.0'
diff --git a/build.gradle b/build.gradle
index 057d58791..8f90db5b4 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,28 +1,20 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
- ext {
- lifecycle_version = '2.6.1'
- navigation_version = '2.5.3'
- mdc_version = '1.9.0-beta01'
- preference_version = '1.2.0'
- appcompat_version = '1.6.1'
- core_version = '1.10.0-rc01'
- }
repositories {
mavenCentral()
google()
}
dependencies {
- classpath 'com.android.tools.build:gradle:7.4.2'
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.10"
- classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$navigation_version"
+ classpath libs.gradle
+ classpath libs.kotlin.gradle.plugin
+ classpath libs.androidx.navigation.safeargs.plugin
}
}
plugins {
- id "com.github.ben-manes.versions" version "0.46.0"
- id 'com.google.devtools.ksp' version '1.8.10-1.0.9' apply false
+ alias libs.plugins.github.ben.manes
+ alias libs.plugins.google.devtools.ksp apply false
}
tasks.register('clean', Delete) {
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
new file mode 100644
index 000000000..59e76791a
--- /dev/null
+++ b/gradle/libs.versions.toml
@@ -0,0 +1,29 @@
+[versions]
+#buildscripts dependencies
+gradle = "7.4.2"
+kotlinGradlePlugin = "1.8.10"
+
+lifecycle_version = "2.6.1"
+navigation_version = "2.5.3"
+mdc_version = "1.9.0-beta01"
+preference_version = "1.2.0"
+appcompat_version = "1.6.1"
+core_version = "1.10.0-rc01"
+
+#plugins
+devTools_ksp_version = "1.8.10-1.0.9"
+ben_manes_versoin = "0.46.0"
+
+
+[libraries]
+#dependencies
+gridLayout = {group = "androidx.gridlayout", name = "gridlayout", version="1.0.0"}
+
+#buildscripts dependencies
+gradle = { module = "com.android.tools.build:gradle", version.ref = "gradle" }
+androidx-navigation-safeargs-plugin = { module = "androidx.navigation:navigation-safe-args-gradle-plugin", version.ref = "navigation_version" }
+kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlinGradlePlugin" }
+
+[plugins]
+github-ben-manes = { id = "com.github.ben-manes.versions", version.ref = "ben_manes_versoin" }
+google-devtools-ksp = { id = "com.google.devtools.ksp", version.ref = "devTools_ksp_version" }
\ No newline at end of file
From 8ade78bf483db0a627a4d04118ad6f9d117f743b Mon Sep 17 00:00:00 2001
From: Tule Simon <58936865+TuleSimon@users.noreply.github.com>
Date: Sun, 16 Apr 2023 15:48:07 +0100
Subject: [PATCH 02/11] finished migration to version catalog
---
app/build.gradle | 101 +++++++++++++++++-----------------
appthemehelper/build.gradle | 6 +--
gradle/libs.versions.toml | 104 +++++++++++++++++++++++++++++++++++-
3 files changed, 156 insertions(+), 55 deletions(-)
diff --git a/app/build.gradle b/app/build.gradle
index d79216ac4..24e6d80a4 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -100,81 +100,80 @@ static def getProperty(Properties properties, String name) {
dependencies {
implementation project(':appthemehelper')
- implementation(libs.gridLayout)
+ implementation libs.gridLayout
- implementation "androidx.appcompat:appcompat:$appcompat_version"
- implementation 'androidx.annotation:annotation:1.6.0'
- implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
- implementation 'androidx.recyclerview:recyclerview:1.3.0'
- implementation "androidx.preference:preference-ktx:$preference_version"
- implementation "androidx.core:core-ktx:$core_version"
- implementation 'androidx.palette:palette-ktx:1.0.0'
+ implementation libs.androidx.appcompat
+ implementation libs.androidx.annotation
+ implementation libs.androidx.constraintLayout
+ implementation libs.androidx.recyclerview
+ implementation libs.androidx.preference.ktx
+ implementation libs.androidx.core.ktx
+ implementation libs.androidx.palette.ktx
- implementation 'androidx.mediarouter:mediarouter:1.3.1'
+ implementation libs.androidx.mediarouter
//Cast Dependencies
- normalImplementation 'com.google.android.gms:play-services-cast-framework:21.3.0'
+ normalImplementation libs.play.services.cast.framework
//WebServer by NanoHttpd
- normalImplementation "org.nanohttpd:nanohttpd:2.3.1"
+ normalImplementation libs.nanohttpd
- implementation "androidx.navigation:navigation-runtime-ktx:$navigation_version"
- implementation "androidx.navigation:navigation-fragment-ktx:$navigation_version"
- implementation "androidx.navigation:navigation-ui-ktx:$navigation_version"
+ implementation libs.androidx.navigation.runtime.ktx
+ implementation libs.androidx.navigation.fragment.ktx
+ implementation libs.androidx.navigation.ui.ktx
- def room_version = '2.5.1'
- implementation "androidx.room:room-runtime:$room_version"
- implementation "androidx.room:room-ktx:$room_version"
- ksp "androidx.room:room-compiler:$room_version"
+ implementation libs.androidx.room.runtime
+ implementation libs.androidx.room.ktx
+ ksp libs.androidx.room.compiler
- implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
- implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version"
- implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version"
+ implementation libs.androidx.lifecycle.viewmodel.ktx
+ implementation libs.androidx.lifecycle.livedata.ktx
+ implementation libs.androidx.lifecycle.common.java8
- implementation "androidx.core:core-splashscreen:1.0.0"
+ implementation libs.androidx.core.splashscreen
- normalImplementation 'com.google.android.play:feature-delivery:2.0.1'
- normalImplementation 'com.google.android.play:review:2.0.1'
+ normalImplementation libs.feature.delivery
+ normalImplementation libs.review
- implementation "com.google.android.material:material:$mdc_version"
+ implementation libs.android.material
def retrofit_version = '2.9.0'
- implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
- implementation "com.squareup.retrofit2:converter-gson:$retrofit_version"
- implementation 'com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.9'
+ implementation libs.retrofit
+ implementation libs.converter.gson
+ implementation libs.logging.interceptor
def material_dialog_version = "3.3.0"
- implementation "com.afollestad.material-dialogs:core:$material_dialog_version"
- implementation "com.afollestad.material-dialogs:input:$material_dialog_version"
- implementation "com.afollestad.material-dialogs:color:$material_dialog_version"
+ implementation libs.core
+ implementation libs.input
+ implementation libs.color
- implementation 'com.afollestad:material-cab:2.0.1'
+ implementation libs.material.cab
- implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4"
+ implementation libs.kotlinx.coroutines.android
def koin_version = '3.4.0'
implementation "io.insert-koin:koin-core:$koin_version"
- implementation "io.insert-koin:koin-android:$koin_version"
+ implementation libs.koin.android
def glide_version = '4.15.1'
- implementation "com.github.bumptech.glide:glide:$glide_version"
- ksp "com.github.bumptech.glide:ksp:$glide_version"
- implementation "com.github.bumptech.glide:okhttp3-integration:$glide_version"
+ implementation libs.glide
+ ksp libs.glide.ksp
+ implementation libs.glide.okhttp3.integration
- implementation 'com.h6ah4i.android.widget.advrecyclerview:advrecyclerview:1.0.0'
+ implementation libs.advrecyclerview
- implementation 'com.github.bosphere.android-fadingedgelayout:fadingedgelayout:1.0.0'
+ implementation libs.fadingedgelayout
- implementation 'net.yslibrary.keyboardvisibilityevent:keyboardvisibilityevent:3.0.0-RC3'
- implementation 'com.github.jetradarmobile:android-snowfall:1.2.1'
+ implementation libs.keyboardvisibilityevent
+ implementation libs.android.snowfall
- implementation "dev.chrisbanes.insetter:insetter:0.6.1"
+ implementation libs.insetter
- implementation 'org.eclipse.mylyn.github:org.eclipse.egit.github.core:2.1.5'
- implementation 'com.github.Adonai:jaudiotagger:2.3.15'
- normalImplementation 'com.anjlab.android.iab.v3:library:2.0.3'
- implementation 'com.r0adkll:slidableactivity:2.1.0'
- implementation 'com.heinrichreimersoftware:material-intro:2.0.0'
- implementation 'com.github.dhaval2404:imagepicker:2.1'
- implementation 'me.zhanghai.android.fastscroll:library:1.2.0'
- implementation 'cat.ereza:customactivityoncrash:2.4.0'
- implementation 'me.tankery.lib:circularSeekBar:1.4.2'
+ implementation libs.org.eclipse.egit.github.core
+ implementation libs.jaudiotagger
+ normalImplementation libs.android.lab.library
+ implementation libs.slidableactivity
+ implementation libs.material.intro
+ implementation libs.imagepicker
+ implementation libs.fastscroll.library
+ implementation libs.customactivityoncrash
+ implementation libs.circularSeekBar
}
\ No newline at end of file
diff --git a/appthemehelper/build.gradle b/appthemehelper/build.gradle
index 2a5e0f50d..775ae3229 100644
--- a/appthemehelper/build.gradle
+++ b/appthemehelper/build.gradle
@@ -24,7 +24,7 @@ android {
}
dependencies {
- implementation "androidx.appcompat:appcompat:$appcompat_version"
- implementation "com.google.android.material:material:$mdc_version"
- implementation "androidx.preference:preference-ktx:$preference_version"
+ implementation libs.androidx.appcompat
+ implementation libs.android.material
+ implementation libs.androidx.preference.ktx
}
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 59e76791a..de428deaf 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -1,23 +1,125 @@
[versions]
#buildscripts dependencies
+advrecyclerview = "1.0.0"
+androidSnowfall = "1.2.1"
+circularSeekBar = "1.4.2"
+converterGson = "2.9.0"
+core = "3.3.0"
+coreSplashscreen = "1.0.0"
+customactivityoncrash = "2.4.0"
+fadingedgelayout = "1.0.0"
+featureDelivery = "2.0.1"
gradle = "7.4.2"
+imagepicker = "2.1"
+insetter = "0.6.1"
+jaudiotagger = "2.3.15"
+keyboardvisibilityevent = "3.0.0-RC3"
+koinAndroid = "3.4.0"
kotlinGradlePlugin = "1.8.10"
+kotlinxCoroutinesAndroid = "1.6.4"
+android_tab_library_version = "2.0.3"
+fast_scroll_libraryVersion = "1.2.0"
lifecycle_version = "2.6.1"
+loggingInterceptor = "5.0.0-alpha.9"
+materialCab = "2.0.1"
+materialIntro = "2.0.0"
+mediarouter = "1.3.1"
+nanohttpd = "2.3.1"
navigation_version = "2.5.3"
mdc_version = "1.9.0-beta01"
+glide_version = "4.15.1"
+orgEclipseEgitGithubCore = "2.1.5"
+playServicesCastFramework = "21.3.0"
preference_version = "1.2.0"
appcompat_version = "1.6.1"
+review = "2.0.1"
+room_version = "2.5.1"
core_version = "1.10.0-rc01"
#plugins
devTools_ksp_version = "1.8.10-1.0.9"
ben_manes_versoin = "0.46.0"
+slidableactivity = "2.1.0"
[libraries]
#dependencies
-gridLayout = {group = "androidx.gridlayout", name = "gridlayout", version="1.0.0"}
+#navigation
+androidx-navigation-ui-ktx = { module = "androidx.navigation:navigation-ui-ktx", version.ref = "navigation_version" }
+androidx-navigation-fragment-ktx = { module = "androidx.navigation:navigation-fragment-ktx", version.ref = "navigation_version" }
+androidx-navigation-runtime-ktx = { module = "androidx.navigation:navigation-runtime-ktx", version.ref = "navigation_version" }
+
+#lifecycle
+androidx-lifecycle-common-java8 = { module = "androidx.lifecycle:lifecycle-common-java8", version.ref = "lifecycle_version" }
+androidx-lifecycle-livedata-ktx = { module = "androidx.lifecycle:lifecycle-livedata-ktx", version.ref = "lifecycle_version" }
+androidx-lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "lifecycle_version" }
+
+#room
+androidx-room-ktx = { module = "androidx.room:room-ktx", version.ref = "room_version" }
+androidx-room-runtime = { module = "androidx.room:room-runtime", version.ref = "room_version" }
+androidx-room-compiler = { module = "androidx.room:room-compiler", version.ref = "room_version" }
+
+#google_play
+feature-delivery = { module = "com.google.android.play:feature-delivery", version.ref = "featureDelivery" }
+play-services-cast-framework = { module = "com.google.android.gms:play-services-cast-framework", version.ref = "playServicesCastFramework" }
+review = { module = "com.google.android.play:review", version.ref = "review" }
+
+#glide
+glide = { module = "com.github.bumptech.glide:glide", version.ref = "glide_version" }
+glide-ksp = { module = "com.github.bumptech.glide:ksp", version.ref = "glide_version" }
+glide-okhttp3-integration = { module = "com.github.bumptech.glide:okhttp3-integration", version.ref = "glide_version" }
+
+
+#koin
+koin-android = { module = "io.insert-koin:koin-android", version.ref = "koinAndroid" }
+koin-core = { module = "io.insert-koin:koin-core", version.ref = "koinAndroid" }
+
+
+#material dialog
+color = { module = "com.afollestad.material-dialogs:color", version.ref = "core" }
+core = { module = "com.afollestad.material-dialogs:core", version.ref = "core" }
+input = { module = "com.afollestad.material-dialogs:input", version.ref = "core" }
+material-cab = { module = "com.afollestad:material-cab", version.ref = "materialCab" }
+
+#Retrofit and apos
+converter-gson = { module = "com.squareup.retrofit2:converter-gson", version.ref = "converterGson" }
+logging-interceptor = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "loggingInterceptor" }
+retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "converterGson" }
+
+#misc
+gridLayout = { group = "androidx.gridlayout", name = "gridlayout", version = "1.0.0" }
+android-material = { module = "com.google.android.material:material", version.ref = "mdc_version" }
+kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "kotlinxCoroutinesAndroid" }
+advrecyclerview = { module = "com.h6ah4i.android.widget.advrecyclerview:advrecyclerview", version.ref = "advrecyclerview" }
+fadingedgelayout = { module = "com.github.bosphere.android-fadingedgelayout:fadingedgelayout", version.ref = "fadingedgelayout" }
+keyboardvisibilityevent = { module = "net.yslibrary.keyboardvisibilityevent:keyboardvisibilityevent", version.ref = "keyboardvisibilityevent" }
+android-snowfall = { module = "com.github.jetradarmobile:android-snowfall", version.ref = "androidSnowfall" }
+insetter = { module = "dev.chrisbanes.insetter:insetter", version.ref = "insetter" }
+org-eclipse-egit-github-core = { module = "org.eclipse.mylyn.github:org.eclipse.egit.github.core", version.ref = "orgEclipseEgitGithubCore" }
+jaudiotagger = { module = "com.github.Adonai:jaudiotagger", version.ref = "jaudiotagger" }
+android-lab-library = { module = "com.anjlab.android.iab.v3:library", version.ref = "android_tab_library_version" }
+slidableactivity = { module = "com.r0adkll:slidableactivity", version.ref = "slidableactivity" }
+material-intro = { module = "com.heinrichreimersoftware:material-intro", version.ref = "materialIntro" }
+imagepicker = { module = "com.github.dhaval2404:imagepicker", version.ref = "imagepicker" }
+fastscroll-library = { module = "me.zhanghai.android.fastscroll:library", version.ref = "fast_scroll_libraryVersion" }
+customactivityoncrash = { module = "cat.ereza:customactivityoncrash", version.ref = "customactivityoncrash" }
+circularSeekBar = { module = "me.tankery.lib:circularSeekBar", version.ref = "circularSeekBar" }
+androidx-mediarouter = { group = "androidx.mediarouter", name="mediarouter", version.ref = "mediarouter" }
+nanohttpd = { group = "org.nanohttpd", name="nanohttpd", version.ref = "nanohttpd" }
+
+
+#androidx
+androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat_version" }
+androidx-annotation = { group = "androidx.annotation", name = "annotation", version = "1.6.0" }
+androidx-constraintLayout = { group = "androidx.constraintlayout", name = "constraintlayout", version = "2.1.4" }
+androidx-recyclerview = { group = "androidx.recyclerview", name = "recyclerview", version = "1.3.0" }
+androidx-preference-ktx = { group = "androidx.preference", name = "preference-ktx", version.ref = "preference_version" }
+androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "core_version" }
+androidx-core-splashscreen = { module = "androidx.core:core-splashscreen", version.ref = "coreSplashscreen" }
+androidx-palette-ktx = { group = "androidx.palette", name = "palette-ktx", version = "1.0.0" }
+
+
#buildscripts dependencies
gradle = { module = "com.android.tools.build:gradle", version.ref = "gradle" }
From 7ee1aa6466ef4dede741971980b4bcd70d2241a5 Mon Sep 17 00:00:00 2001
From: Tule Simon <58936865+TuleSimon@users.noreply.github.com>
Date: Sun, 16 Apr 2023 17:40:07 +0100
Subject: [PATCH 03/11] improving naming conventiong
---
gradle/libs.versions.toml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index de428deaf..8f4732dc6 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -4,7 +4,7 @@ advrecyclerview = "1.0.0"
androidSnowfall = "1.2.1"
circularSeekBar = "1.4.2"
converterGson = "2.9.0"
-core = "3.3.0"
+afollestad_dialog_version = "3.3.0"
coreSplashscreen = "1.0.0"
customactivityoncrash = "2.4.0"
fadingedgelayout = "1.0.0"
@@ -77,8 +77,8 @@ koin-core = { module = "io.insert-koin:koin-core", version.ref = "koinAndroid" }
#material dialog
-color = { module = "com.afollestad.material-dialogs:color", version.ref = "core" }
-core = { module = "com.afollestad.material-dialogs:core", version.ref = "core" }
+afollestad-material-dialogs-color = { module = "com.afollestad.material-dialogs:color", version.ref = "core" }
+afollestad-material-dialogs-core = { module = "com.afollestad.material-dialogs:core", version.ref = "core" }
input = { module = "com.afollestad.material-dialogs:input", version.ref = "core" }
material-cab = { module = "com.afollestad:material-cab", version.ref = "materialCab" }
From 577824b86e21b81426e0181d63ca55eeaaaa62e7 Mon Sep 17 00:00:00 2001
From: Tule Simon <58936865+TuleSimon@users.noreply.github.com>
Date: Sun, 16 Apr 2023 19:09:12 +0100
Subject: [PATCH 04/11] finishedimproving naming conventiong
---
app/build.gradle | 33 ++++++++++++---------------
gradle/libs.versions.toml | 48 +++++++++++++++++++--------------------
2 files changed, 38 insertions(+), 43 deletions(-)
diff --git a/app/build.gradle b/app/build.gradle
index 24e6d80a4..19d029d86 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -112,7 +112,7 @@ dependencies {
implementation libs.androidx.mediarouter
//Cast Dependencies
- normalImplementation libs.play.services.cast.framework
+ //normalImplementation libs.google.play.services.cast.framework
//WebServer by NanoHttpd
normalImplementation libs.nanohttpd
@@ -130,30 +130,25 @@ dependencies {
implementation libs.androidx.core.splashscreen
- normalImplementation libs.feature.delivery
- normalImplementation libs.review
+ normalImplementation libs.google.feature.delivery
+ normalImplementation libs.google.play.review
implementation libs.android.material
- def retrofit_version = '2.9.0'
implementation libs.retrofit
- implementation libs.converter.gson
- implementation libs.logging.interceptor
+ implementation libs.retrofit.converter.gson
+ implementation libs.okhttp3.logging.interceptor
- def material_dialog_version = "3.3.0"
- implementation libs.core
- implementation libs.input
- implementation libs.color
-
- implementation libs.material.cab
+ implementation libs.afollestad.material.dialogs.core
+ implementation libs.afollestad.material.dialogs.input
+ implementation libs.afollestad.material.dialogs.color
+ implementation libs.afollestad.material.cab
implementation libs.kotlinx.coroutines.android
- def koin_version = '3.4.0'
- implementation "io.insert-koin:koin-core:$koin_version"
+ implementation libs.koin.core
implementation libs.koin.android
- def glide_version = '4.15.1'
implementation libs.glide
ksp libs.glide.ksp
implementation libs.glide.okhttp3.integration
@@ -163,17 +158,17 @@ dependencies {
implementation libs.fadingedgelayout
implementation libs.keyboardvisibilityevent
- implementation libs.android.snowfall
+ implementation libs.jetradarmobile.android.snowfall
- implementation libs.insetter
+ implementation libs.chrisbanes.insetter
implementation libs.org.eclipse.egit.github.core
implementation libs.jaudiotagger
normalImplementation libs.android.lab.library
implementation libs.slidableactivity
implementation libs.material.intro
- implementation libs.imagepicker
+ implementation libs.dhaval2404.imagepicker
implementation libs.fastscroll.library
implementation libs.customactivityoncrash
- implementation libs.circularSeekBar
+ implementation libs.tankery.circularSeekBar
}
\ No newline at end of file
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 8f4732dc6..7df282da0 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -1,19 +1,19 @@
[versions]
#buildscripts dependencies
advrecyclerview = "1.0.0"
-androidSnowfall = "1.2.1"
-circularSeekBar = "1.4.2"
-converterGson = "2.9.0"
+jetradarmobile_androidSnowfall_version = "1.2.1"
+tankery_circularSeekBar_version = "1.4.2"
+retrofit_version = "2.9.0"
afollestad_dialog_version = "3.3.0"
coreSplashscreen = "1.0.0"
customactivityoncrash = "2.4.0"
fadingedgelayout = "1.0.0"
-featureDelivery = "2.0.1"
+google_featureDelivery_version = "2.0.1"
gradle = "7.4.2"
-imagepicker = "2.1"
-insetter = "0.6.1"
+dhaval2404_imagepicker_version = "2.1"
+chrisbanes_insetter_version = "0.6.1"
jaudiotagger = "2.3.15"
-keyboardvisibilityevent = "3.0.0-RC3"
+yslibrary_keyboardvisibilityevent_version = "3.0.0-RC3"
koinAndroid = "3.4.0"
kotlinGradlePlugin = "1.8.10"
@@ -21,8 +21,8 @@ kotlinxCoroutinesAndroid = "1.6.4"
android_tab_library_version = "2.0.3"
fast_scroll_libraryVersion = "1.2.0"
lifecycle_version = "2.6.1"
-loggingInterceptor = "5.0.0-alpha.9"
-materialCab = "2.0.1"
+okhttp3_loggingInterceptor_version = "5.0.0-alpha.9"
+afollestad_materialCab_version = "2.0.1"
materialIntro = "2.0.0"
mediarouter = "1.3.1"
nanohttpd = "2.3.1"
@@ -33,7 +33,7 @@ orgEclipseEgitGithubCore = "2.1.5"
playServicesCastFramework = "21.3.0"
preference_version = "1.2.0"
appcompat_version = "1.6.1"
-review = "2.0.1"
+google_play_review_version = "2.0.1"
room_version = "2.5.1"
core_version = "1.10.0-rc01"
@@ -61,9 +61,9 @@ androidx-room-runtime = { module = "androidx.room:room-runtime", version.ref = "
androidx-room-compiler = { module = "androidx.room:room-compiler", version.ref = "room_version" }
#google_play
-feature-delivery = { module = "com.google.android.play:feature-delivery", version.ref = "featureDelivery" }
+google-feature-delivery = { module = "com.google.android.play:feature-delivery", version.ref = "google_featureDelivery_version" }
play-services-cast-framework = { module = "com.google.android.gms:play-services-cast-framework", version.ref = "playServicesCastFramework" }
-review = { module = "com.google.android.play:review", version.ref = "review" }
+google-play-review = { module = "com.google.android.play:review", version.ref = "google_play_review_version" }
#glide
glide = { module = "com.github.bumptech.glide:glide", version.ref = "glide_version" }
@@ -77,15 +77,15 @@ koin-core = { module = "io.insert-koin:koin-core", version.ref = "koinAndroid" }
#material dialog
-afollestad-material-dialogs-color = { module = "com.afollestad.material-dialogs:color", version.ref = "core" }
-afollestad-material-dialogs-core = { module = "com.afollestad.material-dialogs:core", version.ref = "core" }
-input = { module = "com.afollestad.material-dialogs:input", version.ref = "core" }
-material-cab = { module = "com.afollestad:material-cab", version.ref = "materialCab" }
+afollestad-material-dialogs-color = { module = "com.afollestad.material-dialogs:color", version.ref = "afollestad_dialog_version" }
+afollestad-material-dialogs-core = { module = "com.afollestad.material-dialogs:core", version.ref = "afollestad_dialog_version" }
+afollestad-material-dialogs-input = { module = "com.afollestad.material-dialogs:input", version.ref = "afollestad_dialog_version" }
+afollestad-material-cab = { module = "com.afollestad:material-cab", version.ref = "afollestad_materialCab_version" }
#Retrofit and apos
-converter-gson = { module = "com.squareup.retrofit2:converter-gson", version.ref = "converterGson" }
-logging-interceptor = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "loggingInterceptor" }
-retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "converterGson" }
+retrofit-converter-gson = { module = "com.squareup.retrofit2:converter-gson", version.ref = "retrofit_version" }
+okhttp3-logging-interceptor = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "okhttp3_loggingInterceptor_version" }
+retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit_version" }
#misc
gridLayout = { group = "androidx.gridlayout", name = "gridlayout", version = "1.0.0" }
@@ -93,18 +93,18 @@ android-material = { module = "com.google.android.material:material", version.re
kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "kotlinxCoroutinesAndroid" }
advrecyclerview = { module = "com.h6ah4i.android.widget.advrecyclerview:advrecyclerview", version.ref = "advrecyclerview" }
fadingedgelayout = { module = "com.github.bosphere.android-fadingedgelayout:fadingedgelayout", version.ref = "fadingedgelayout" }
-keyboardvisibilityevent = { module = "net.yslibrary.keyboardvisibilityevent:keyboardvisibilityevent", version.ref = "keyboardvisibilityevent" }
-android-snowfall = { module = "com.github.jetradarmobile:android-snowfall", version.ref = "androidSnowfall" }
-insetter = { module = "dev.chrisbanes.insetter:insetter", version.ref = "insetter" }
+keyboardvisibilityevent = { module = "net.yslibrary.keyboardvisibilityevent:keyboardvisibilityevent", version.ref = "yslibrary_keyboardvisibilityevent_version" }
+jetradarmobile-android-snowfall = { module = "com.github.jetradarmobile:android-snowfall", version.ref = "jetradarmobile_androidSnowfall_version" }
+chrisbanes-insetter = { module = "dev.chrisbanes.insetter:insetter", version.ref = "chrisbanes_insetter_version" }
org-eclipse-egit-github-core = { module = "org.eclipse.mylyn.github:org.eclipse.egit.github.core", version.ref = "orgEclipseEgitGithubCore" }
jaudiotagger = { module = "com.github.Adonai:jaudiotagger", version.ref = "jaudiotagger" }
android-lab-library = { module = "com.anjlab.android.iab.v3:library", version.ref = "android_tab_library_version" }
slidableactivity = { module = "com.r0adkll:slidableactivity", version.ref = "slidableactivity" }
material-intro = { module = "com.heinrichreimersoftware:material-intro", version.ref = "materialIntro" }
-imagepicker = { module = "com.github.dhaval2404:imagepicker", version.ref = "imagepicker" }
+dhaval2404-imagepicker = { module = "com.github.dhaval2404:imagepicker", version.ref = "dhaval2404_imagepicker_version" }
fastscroll-library = { module = "me.zhanghai.android.fastscroll:library", version.ref = "fast_scroll_libraryVersion" }
customactivityoncrash = { module = "cat.ereza:customactivityoncrash", version.ref = "customactivityoncrash" }
-circularSeekBar = { module = "me.tankery.lib:circularSeekBar", version.ref = "circularSeekBar" }
+tankery-circularSeekBar = { module = "me.tankery.lib:circularSeekBar", version.ref = "tankery_circularSeekBar_version" }
androidx-mediarouter = { group = "androidx.mediarouter", name="mediarouter", version.ref = "mediarouter" }
nanohttpd = { group = "org.nanohttpd", name="nanohttpd", version.ref = "nanohttpd" }
From 356876c14eead06a90e101e7d242e7f2ab15065c Mon Sep 17 00:00:00 2001
From: Tule Simon <58936865+TuleSimon@users.noreply.github.com>
Date: Sun, 16 Apr 2023 19:09:53 +0100
Subject: [PATCH 05/11] finished improving naming conventiong
---
gradle/libs.versions.toml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 7df282da0..d1f44f24e 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -105,8 +105,8 @@ dhaval2404-imagepicker = { module = "com.github.dhaval2404:imagepicker", version
fastscroll-library = { module = "me.zhanghai.android.fastscroll:library", version.ref = "fast_scroll_libraryVersion" }
customactivityoncrash = { module = "cat.ereza:customactivityoncrash", version.ref = "customactivityoncrash" }
tankery-circularSeekBar = { module = "me.tankery.lib:circularSeekBar", version.ref = "tankery_circularSeekBar_version" }
-androidx-mediarouter = { group = "androidx.mediarouter", name="mediarouter", version.ref = "mediarouter" }
-nanohttpd = { group = "org.nanohttpd", name="nanohttpd", version.ref = "nanohttpd" }
+androidx-mediarouter = { group = "androidx.mediarouter", name = "mediarouter", version.ref = "mediarouter" }
+nanohttpd = { group = "org.nanohttpd", name = "nanohttpd", version.ref = "nanohttpd" }
#androidx
From b08d80b181377b0cdb4666f6741f6ba0be5c97ea Mon Sep 17 00:00:00 2001
From: Tule Simon <58936865+TuleSimon@users.noreply.github.com>
Date: Sun, 16 Apr 2023 19:14:17 +0100
Subject: [PATCH 06/11] finished improving naming conventiong
---
app/build.gradle | 2 +-
gradle/libs.versions.toml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/build.gradle b/app/build.gradle
index 19d029d86..47b03cabd 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -112,7 +112,7 @@ dependencies {
implementation libs.androidx.mediarouter
//Cast Dependencies
- //normalImplementation libs.google.play.services.cast.framework
+ normalImplementation libs.google.play.services.cast.framework
//WebServer by NanoHttpd
normalImplementation libs.nanohttpd
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index d1f44f24e..67ef6aff5 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -62,7 +62,7 @@ androidx-room-compiler = { module = "androidx.room:room-compiler", version.ref =
#google_play
google-feature-delivery = { module = "com.google.android.play:feature-delivery", version.ref = "google_featureDelivery_version" }
-play-services-cast-framework = { module = "com.google.android.gms:play-services-cast-framework", version.ref = "playServicesCastFramework" }
+google-play-services-cast-framework = { module = "com.google.android.gms:play-services-cast-framework", version.ref = "playServicesCastFramework" }
google-play-review = { module = "com.google.android.play:review", version.ref = "google_play_review_version" }
#glide
From 77f462be9d0f824ab8c6e11d63e68e441e6322c0 Mon Sep 17 00:00:00 2001
From: Tule Simon <58936865+TuleSimon@users.noreply.github.com>
Date: Sat, 22 Apr 2023 16:48:44 +0100
Subject: [PATCH 07/11] creating landscape variant
---
.../player/classic/ClassicPlayerFragment.kt | 14 +-
.../layout-land/fragment_classic_player.xml | 134 ++++++++++++++++++
2 files changed, 147 insertions(+), 1 deletion(-)
create mode 100644 app/src/main/res/layout-land/fragment_classic_player.xml
diff --git a/app/src/main/java/code/name/monkey/retromusic/fragments/player/classic/ClassicPlayerFragment.kt b/app/src/main/java/code/name/monkey/retromusic/fragments/player/classic/ClassicPlayerFragment.kt
index ed51772bd..2f18ee1bf 100644
--- a/app/src/main/java/code/name/monkey/retromusic/fragments/player/classic/ClassicPlayerFragment.kt
+++ b/app/src/main/java/code/name/monkey/retromusic/fragments/player/classic/ClassicPlayerFragment.kt
@@ -17,6 +17,7 @@ package code.name.monkey.retromusic.fragments.player.classic
import android.animation.ObjectAnimator
import android.annotation.SuppressLint
import android.content.res.ColorStateList
+import android.content.res.Configuration
import android.graphics.Color
import android.graphics.PorterDuff
import android.os.Bundle
@@ -26,6 +27,7 @@ import android.widget.SeekBar
import androidx.activity.OnBackPressedCallback
import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.widget.Toolbar
+import androidx.coordinatorlayout.widget.CoordinatorLayout
import androidx.fragment.app.commit
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
@@ -131,6 +133,16 @@ class ClassicPlayerFragment : AbsPlayerFragment(R.layout.fragment_classic_player
hideVolumeIfAvailable()
setupRecyclerView()
+ val config = resources.configuration;
+
+ // Check if the device is in landscape mode
+ if (config.orientation == Configuration.ORIENTATION_LANDSCAPE) {
+ val layoutParams =
+ binding.playerQueueSheet.layoutParams as CoordinatorLayout.LayoutParams
+ layoutParams.width = (resources.displayMetrics.widthPixels * 0.53).toInt()
+ binding.playerQueueSheet.layoutParams = layoutParams
+ }
+
val coverFragment: PlayerAlbumCoverFragment = whichFragment(R.id.playerAlbumCoverFragment)
coverFragment.setCallbacks(this)
@@ -164,7 +176,7 @@ class ClassicPlayerFragment : AbsPlayerFragment(R.layout.fragment_classic_player
binding.text.setOnClickListener {
goToArtist(requireActivity())
}
- requireActivity().onBackPressedDispatcher.addCallback(object: OnBackPressedCallback(true) {
+ requireActivity().onBackPressedDispatcher.addCallback(object : OnBackPressedCallback(true) {
override fun handleOnBackPressed() {
if (getQueuePanel().state == BottomSheetBehavior.STATE_EXPANDED) {
getQueuePanel().state = BottomSheetBehavior.STATE_COLLAPSED
diff --git a/app/src/main/res/layout-land/fragment_classic_player.xml b/app/src/main/res/layout-land/fragment_classic_player.xml
new file mode 100644
index 000000000..998da6bec
--- /dev/null
+++ b/app/src/main/res/layout-land/fragment_classic_player.xml
@@ -0,0 +1,134 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
From fa40966eb36c163c6f363f22e6db6a46e47e35fc Mon Sep 17 00:00:00 2001
From: Tule Simon <58936865+TuleSimon@users.noreply.github.com>
Date: Sat, 22 Apr 2023 16:54:47 +0100
Subject: [PATCH 08/11] fixin size issues
---
app/src/main/res/layout-land/fragment_classic_player.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/src/main/res/layout-land/fragment_classic_player.xml b/app/src/main/res/layout-land/fragment_classic_player.xml
index 998da6bec..766106d36 100644
--- a/app/src/main/res/layout-land/fragment_classic_player.xml
+++ b/app/src/main/res/layout-land/fragment_classic_player.xml
@@ -59,7 +59,7 @@
app:layout_constraintStart_toStartOf="parent"
android:layout_marginBottom="20dp"
app:layout_constraintBottom_toBottomOf="@id/playerAlbumCoverFragment"
- app:layout_constraintTop_toTopf="@id/playerAlbumCoverFragment" />
+ />
Date: Sat, 22 Apr 2023 18:18:18 +0100
Subject: [PATCH 09/11] tinting navigation bar when on landscape mode
---
.../player/classic/ClassicPlayerFragment.kt | 97 ++++++++++++++++---
.../layout-land/fragment_classic_player.xml | 36 +++++--
2 files changed, 107 insertions(+), 26 deletions(-)
diff --git a/app/src/main/java/code/name/monkey/retromusic/fragments/player/classic/ClassicPlayerFragment.kt b/app/src/main/java/code/name/monkey/retromusic/fragments/player/classic/ClassicPlayerFragment.kt
index 2f18ee1bf..bc605b546 100644
--- a/app/src/main/java/code/name/monkey/retromusic/fragments/player/classic/ClassicPlayerFragment.kt
+++ b/app/src/main/java/code/name/monkey/retromusic/fragments/player/classic/ClassicPlayerFragment.kt
@@ -28,6 +28,7 @@ import androidx.activity.OnBackPressedCallback
import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.widget.Toolbar
import androidx.coordinatorlayout.widget.CoordinatorLayout
+import androidx.core.content.ContextCompat
import androidx.fragment.app.commit
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
@@ -66,6 +67,7 @@ import com.h6ah4i.android.widget.advrecyclerview.swipeable.RecyclerViewSwipeMana
import com.h6ah4i.android.widget.advrecyclerview.touchguard.RecyclerViewTouchActionGuardManager
import com.h6ah4i.android.widget.advrecyclerview.utils.WrapperAdapterUtils
+
class ClassicPlayerFragment : AbsPlayerFragment(R.layout.fragment_classic_player),
View.OnLayoutChangeListener,
MusicProgressViewUpdateHelper.Callback {
@@ -133,14 +135,9 @@ class ClassicPlayerFragment : AbsPlayerFragment(R.layout.fragment_classic_player
hideVolumeIfAvailable()
setupRecyclerView()
- val config = resources.configuration;
-
// Check if the device is in landscape mode
- if (config.orientation == Configuration.ORIENTATION_LANDSCAPE) {
- val layoutParams =
- binding.playerQueueSheet.layoutParams as CoordinatorLayout.LayoutParams
- layoutParams.width = (resources.displayMetrics.widthPixels * 0.53).toInt()
- binding.playerQueueSheet.layoutParams = layoutParams
+ if (isLandscapeMode()) {
+ resizePlayingQueue()
}
val coverFragment: PlayerAlbumCoverFragment = whichFragment(R.id.playerAlbumCoverFragment)
@@ -185,6 +182,15 @@ class ClassicPlayerFragment : AbsPlayerFragment(R.layout.fragment_classic_player
})
}
+
+ private fun resizePlayingQueue() {
+ val layoutParams =
+ binding.playerQueueSheet.layoutParams as CoordinatorLayout.LayoutParams
+ layoutParams.width = (resources.displayMetrics.widthPixels * 0.5).toInt()
+ layoutParams.height = resources.displayMetrics.heightPixels
+ binding.playerQueueSheet.layoutParams = layoutParams
+ }
+
private fun hideVolumeIfAvailable() {
if (PreferenceUtil.isVolumeVisibilityMode) {
childFragmentManager.commit {
@@ -298,6 +304,11 @@ class ClassicPlayerFragment : AbsPlayerFragment(R.layout.fragment_classic_player
binding.playerControlsContainer.songCurrentProgress.setTextColor(lastPlaybackControlsColor)
binding.playerControlsContainer.songTotalTime.setTextColor(lastPlaybackControlsColor)
+ if (isLandscapeMode()) {
+ val window = requireActivity().window
+ window?.navigationBarColor = color.backgroundColor
+ }
+
ViewUtil.setProgressDrawable(
binding.playerControlsContainer.progressSlider,
color.primaryTextColor,
@@ -380,11 +391,36 @@ class ClassicPlayerFragment : AbsPlayerFragment(R.layout.fragment_classic_player
binding.playerContainer.addOnLayoutChangeListener(this)
return
}
- val height = binding.playerContainer.height
- val width = binding.playerContainer.width
- val finalHeight = height - width
+
+ // Check if the device is in landscape mode
+ if (isLandscapeMode()) {
+ calculateLandScapePeekHeight()
+ } else {
+ val height = binding.playerContainer.height
+ val width = binding.playerContainer.width
+ val finalHeight = height - width
+ val panel = getQueuePanel()
+ panel.peekHeight = finalHeight
+ }
+ }
+
+
+ /**
+ * What am doing here is getting the controls height, and adding the toolbar and statusbar height to itm
+ * then i subtract it from the screen height to get a peek height
+ */
+ private fun calculateLandScapePeekHeight() {
+ val height = binding.playerControlsContainer.root.height
+ val appbarHeight = binding.playerToolbar.height
+ val statusBarHeight = binding.statusBar.height
+ val screenHeight = resources.displayMetrics.heightPixels
+ val peekHeight = screenHeight - (height + appbarHeight + statusBarHeight)
val panel = getQueuePanel()
- panel.peekHeight = finalHeight
+ if (peekHeight > 10) {
+ panel.peekHeight = peekHeight
+ } else {
+ panel.peekHeight = 10
+ }
}
private fun setUpPlayerToolbar() {
@@ -554,10 +590,39 @@ class ClassicPlayerFragment : AbsPlayerFragment(R.layout.fragment_classic_player
oldRight: Int,
oldBottom: Int
) {
- val height = binding.playerContainer.height
- val width = binding.playerContainer.width
- val finalHeight = height - (binding.playerControlsContainer.root.height + width)
- val panel = getQueuePanel()
- panel.peekHeight = finalHeight
+
+ // Check if the device is in landscape mode
+ if (isLandscapeMode()) {
+ calculateLandScapePeekHeight()
+
+ //get background color from viewModel
+ val backgroundColor = libraryViewModel.paletteColor.value
+
+ //check if color is already applied, if not applied then update navigationBarColor
+ backgroundColor?.let { color ->
+ if (isLandscapeMode()) {
+ val window = requireActivity().window
+ window?.navigationBarColor.let { navBarColor ->
+ if (navBarColor == null || navBarColor != color) {
+ window?.navigationBarColor = color
+ }
+ }
+ }
+ }
+ } else {
+
+ val height = binding.playerContainer.height
+ val width = binding.playerContainer.width
+ val finalHeight = height - (binding.playerControlsContainer.root.height + width)
+ val panel = getQueuePanel()
+ panel.peekHeight = finalHeight
+ }
+ }
+
+ private fun isLandscapeMode(): Boolean {
+ val config = resources.configuration;
+
+ // Check if the device is in landscape mode
+ return config.orientation == Configuration.ORIENTATION_LANDSCAPE
}
}
diff --git a/app/src/main/res/layout-land/fragment_classic_player.xml b/app/src/main/res/layout-land/fragment_classic_player.xml
index 766106d36..9d239f030 100644
--- a/app/src/main/res/layout-land/fragment_classic_player.xml
+++ b/app/src/main/res/layout-land/fragment_classic_player.xml
@@ -12,15 +12,30 @@
android:layout_height="match_parent"
android:orientation="vertical">
+
+
+
+
+
@@ -54,19 +69,20 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:elevation="24dp"
- app:layout_constraintEnd_toEndOf="@+id/playerAlbumCoverFragment"
- app:layout_constraintWidth_percent="0.41"
- app:layout_constraintStart_toStartOf="parent"
- android:layout_marginBottom="20dp"
- app:layout_constraintBottom_toBottomOf="@id/playerAlbumCoverFragment"
- />
+ android:layout_marginTop="10dp"
+ app:layout_constraintEnd_toEndOf="parent"
+ android:layout_margin="10dp"
+ app:layout_constraintStart_toStartOf="@+id/middle_guideline"
+ app:layout_constraintTop_toBottomOf="@+id/toolbarContainer"
+ />
Date: Sat, 22 Apr 2023 18:50:56 +0100
Subject: [PATCH 10/11] fixing back buttons
---
.../fragments/player/classic/ClassicPlayerFragment.kt | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/app/src/main/java/code/name/monkey/retromusic/fragments/player/classic/ClassicPlayerFragment.kt b/app/src/main/java/code/name/monkey/retromusic/fragments/player/classic/ClassicPlayerFragment.kt
index bc605b546..7c76add86 100644
--- a/app/src/main/java/code/name/monkey/retromusic/fragments/player/classic/ClassicPlayerFragment.kt
+++ b/app/src/main/java/code/name/monkey/retromusic/fragments/player/classic/ClassicPlayerFragment.kt
@@ -30,6 +30,7 @@ import androidx.appcompat.widget.Toolbar
import androidx.coordinatorlayout.widget.CoordinatorLayout
import androidx.core.content.ContextCompat
import androidx.fragment.app.commit
+import androidx.navigation.fragment.findNavController
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import code.name.monkey.appthemehelper.util.ColorUtil
@@ -178,6 +179,9 @@ class ClassicPlayerFragment : AbsPlayerFragment(R.layout.fragment_classic_player
if (getQueuePanel().state == BottomSheetBehavior.STATE_EXPANDED) {
getQueuePanel().state = BottomSheetBehavior.STATE_COLLAPSED
}
+ else{
+ mainActivity.getBottomSheetBehavior().state=BottomSheetBehavior.STATE_COLLAPSED
+ }
}
})
}
@@ -305,8 +309,7 @@ class ClassicPlayerFragment : AbsPlayerFragment(R.layout.fragment_classic_player
binding.playerControlsContainer.songTotalTime.setTextColor(lastPlaybackControlsColor)
if (isLandscapeMode()) {
- val window = requireActivity().window
- window?.navigationBarColor = color.backgroundColor
+ mainActivity.setNavigationBarColor(color.backgroundColor)
}
ViewUtil.setProgressDrawable(
@@ -604,7 +607,7 @@ class ClassicPlayerFragment : AbsPlayerFragment(R.layout.fragment_classic_player
val window = requireActivity().window
window?.navigationBarColor.let { navBarColor ->
if (navBarColor == null || navBarColor != color) {
- window?.navigationBarColor = color
+ mainActivity.setNavigationBarColor(color)
}
}
}
From de7ea909090fcfa1a13b332f4dbdd7a39b149f9b Mon Sep 17 00:00:00 2001
From: Tule Simon <58936865+TuleSimon@users.noreply.github.com>
Date: Sat, 22 Apr 2023 19:01:53 +0100
Subject: [PATCH 11/11] cleanup
---
app/src/main/res/layout-land/fragment_classic_player.xml | 7 -------
1 file changed, 7 deletions(-)
diff --git a/app/src/main/res/layout-land/fragment_classic_player.xml b/app/src/main/res/layout-land/fragment_classic_player.xml
index 9d239f030..e44519c53 100644
--- a/app/src/main/res/layout-land/fragment_classic_player.xml
+++ b/app/src/main/res/layout-land/fragment_classic_player.xml
@@ -20,13 +20,6 @@
android:layout_height="match_parent"/>
-
-