From 80f623b16297b62b00c24c41b16f4f1bfbc42dd1 Mon Sep 17 00:00:00 2001 From: oakkitten Date: Sun, 11 Feb 2024 13:20:55 +0000 Subject: [PATCH] Use non-transitive R classes See https://blog.blundellapps.co.uk/speed-up-your-build-non-transitive-r-files/ --- .../java/androidx/preference/FullScreenEditTextPreference.java | 2 +- app/src/main/java/com/ubergeek42/WeechatAndroid/service/P.java | 2 +- gradle.properties | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/androidx/preference/FullScreenEditTextPreference.java b/app/src/main/java/androidx/preference/FullScreenEditTextPreference.java index bf2b91c1c..bc3b62501 100644 --- a/app/src/main/java/androidx/preference/FullScreenEditTextPreference.java +++ b/app/src/main/java/androidx/preference/FullScreenEditTextPreference.java @@ -46,7 +46,7 @@ public FullScreenEditTextPreference(Context context) { @SuppressWarnings("WeakerAccess") public FullScreenEditTextPreference(Context context, AttributeSet attrs) { - this(context, attrs, R.attr.editTextPreferenceStyle); + this(context, attrs, androidx.preference.R.attr.editTextPreferenceStyle); } @SuppressWarnings("WeakerAccess") diff --git a/app/src/main/java/com/ubergeek42/WeechatAndroid/service/P.java b/app/src/main/java/com/ubergeek42/WeechatAndroid/service/P.java index c43495d12..5384156f1 100644 --- a/app/src/main/java/com/ubergeek42/WeechatAndroid/service/P.java +++ b/app/src/main/java/com/ubergeek42/WeechatAndroid/service/P.java @@ -88,7 +88,7 @@ public class P implements SharedPreferences.OnSharedPreferenceChangeListener{ public static void storeThemeOrColorSchemeColors(Context context) { ColorScheme scheme = ColorScheme.get(); TypedArray colors = context.obtainStyledAttributes( - new int[] {R.attr.colorPrimary, R.attr.colorPrimaryDark, R.attr.toolbarIconColor}); + new int[] {androidx.appcompat.R.attr.colorPrimary, androidx.appcompat.R.attr.colorPrimaryDark, R.attr.toolbarIconColor}); colorPrimary = scheme.colorPrimary != ColorScheme.NO_COLOR ? scheme.colorPrimary : colors.getColor(0, ColorScheme.NO_COLOR); colorPrimaryDark = scheme.colorPrimaryDark != ColorScheme.NO_COLOR ? diff --git a/gradle.properties b/gradle.properties index 2a4422fe2..9f932517e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -39,5 +39,5 @@ android.useAndroidX=true # kapt is the annotation processor for Kotlin kapt.incremental.apt=true -android.nonTransitiveRClass=false +android.nonTransitiveRClass=true android.nonFinalResIds=false \ No newline at end of file