diff --git a/build.gradle b/build.gradle index 4c349459..f65f0e94 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:8.2.1' + classpath 'com.android.tools.build:gradle:8.4.1' } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index b5fc5a7b..3c85cfe0 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip diff --git a/library/build.gradle b/library/build.gradle index 393a38a5..b77f4b77 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -93,8 +93,8 @@ android { dependencies { implementation project(':extLibs:PreLollipopTransitions') - api 'androidx.annotation:annotation:1.7.1' - api 'androidx.appcompat:appcompat:1.6.1' + api 'androidx.annotation:annotation:1.8.0' + api 'androidx.appcompat:appcompat:1.7.0' api 'com.google.android.apps.muzei:muzei-api:3.4.0' api 'com.android.billingclient:billing:6.1.0' api 'dev.jahir.KustomAPI:api:6369c37' @@ -104,8 +104,7 @@ dependencies { implementation 'androidx.recyclerview:recyclerview:1.3.2' implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' implementation 'androidx.palette:palette:1.0.0' - // implementation 'com.google.android.material:material:1.9.0' - implementation 'com.google.android.material:material:1.11.0' + implementation 'com.google.android.material:material:1.12.0' implementation 'androidx.viewpager2:viewpager2:1.0.0' implementation 'com.google.android.play:review:2.0.1' implementation 'androidx.core:core-splashscreen:1.0.1' diff --git a/library/src/main/java/candybar/lib/adapters/LauncherAdapter.java b/library/src/main/java/candybar/lib/adapters/LauncherAdapter.java index f5f76a20..839b180a 100644 --- a/library/src/main/java/candybar/lib/adapters/LauncherAdapter.java +++ b/library/src/main/java/candybar/lib/adapters/LauncherAdapter.java @@ -105,7 +105,7 @@ public int getItemCount() { @Override public int getItemViewType(int position) { - if (position == getFirstHeaderPosition() || position == getLastHeaderPosition()) { + if (position == getFirstHeaderPosition() || position == getLastHeaderPosition() || position == getMiddleHeaderPosition()) { return TYPE_HEADER; } if (position == getItemCount() - 1) return TYPE_FOOTER; @@ -167,6 +167,11 @@ public int getFirstHeaderPosition() { mContext.getResources().getString(R.string.apply_installed), -1, null)); } + public int getMiddleHeaderPosition() { + return mLaunchers.indexOf(new Icon( + mContext.getResources().getString(R.string.apply_installed_launchers), -3, null)); + } + public int getLastHeaderPosition() { return mLaunchers.indexOf(new Icon( mContext.getResources().getString(R.string.apply_supported), -2, null)); diff --git a/library/src/main/java/candybar/lib/fragments/ApplyFragment.java b/library/src/main/java/candybar/lib/fragments/ApplyFragment.java index 054dddcb..a5eceab2 100644 --- a/library/src/main/java/candybar/lib/fragments/ApplyFragment.java +++ b/library/src/main/java/candybar/lib/fragments/ApplyFragment.java @@ -204,10 +204,14 @@ protected boolean run() { } catch (Exception ignored) { } - if (installed.size() > 0) { + if (installed.size() == 1) { launchers.add(new Icon(getResources().getString( R.string.apply_installed), -1, null)); } + else{ + launchers.add(new Icon(getResources().getString( + R.string.apply_installed_launchers), -3, null)); + } launchers.addAll(installed); launchers.add(new Icon(getResources().getString( diff --git a/library/src/main/res/values/dashboard_strings.xml b/library/src/main/res/values/dashboard_strings.xml index 5e3ef943..acc5eb8b 100644 --- a/library/src/main/res/values/dashboard_strings.xml +++ b/library/src/main/res/values/dashboard_strings.xml @@ -123,6 +123,7 @@ Installed Launcher + Installed Launchers Supported Launchers %1$s Launcher doesn\'t support direct apply, but you can apply %2$s manually from the launcher settings.