From 08a57b84a7c8cbcec6a015e4776939a150aa76e1 Mon Sep 17 00:00:00 2001 From: HuanCheng65 <22636177+HuanCheng65@users.noreply.github.com> Date: Sun, 26 Jun 2022 20:56:01 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=8F=91=E5=B8=83=20Dev=2010?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 18 +++++++++--------- .../tieba/post/fragments/SettingsFragment.kt | 11 ++++++----- .../main/res/layout/activity_app_font_size.xml | 2 +- .../main/res/layout/activity_theme_color.xml | 2 +- application.properties | 4 ++-- 5 files changed, 19 insertions(+), 18 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 652bed5b..9710fa87 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -101,17 +101,17 @@ dependencies { kapt "com.android.support:support-annotations:28.0.0" //AndroidX - implementation "androidx.appcompat:appcompat:1.3.1" - implementation "androidx.core:core-ktx:1.7.0" - implementation "androidx.annotation:annotation:1.3.0" - implementation "androidx.constraintlayout:constraintlayout:2.1.1" - implementation "androidx.preference:preference-ktx:1.1.1" + implementation "androidx.appcompat:appcompat:1.4.2" + implementation "androidx.core:core-ktx:1.8.0" + implementation "androidx.annotation:annotation:1.4.0" + implementation "androidx.constraintlayout:constraintlayout:2.1.4" + implementation "androidx.preference:preference-ktx:1.2.0" implementation "androidx.gridlayout:gridlayout:1.0.0" - implementation "androidx.browser:browser:1.3.0" + implementation "androidx.browser:browser:1.4.0" implementation "androidx.viewpager2:viewpager2:1.0.0" implementation "androidx.palette:palette-ktx:1.0.0" - implementation "androidx.window:window:1.0.0-beta03" - implementation "androidx.startup:startup-runtime:1.1.0" + implementation "androidx.window:window:1.0.0" + implementation "androidx.startup:startup-runtime:1.1.1" //Test testImplementation "junit:junit:4.13.2" @@ -126,7 +126,7 @@ dependencies { kapt "com.github.bumptech.glide:compiler:$glide_version" implementation "com.github.bumptech.glide:okhttp3-integration:$glide_version" - implementation "com.google.android.material:material:1.4.0" + implementation "com.google.android.material:material:1.6.1" implementation "com.squareup.okhttp3:okhttp:4.9.1" implementation "com.squareup.retrofit2:retrofit:$retrofit_version" diff --git a/app/src/main/java/com/huanchengfly/tieba/post/fragments/SettingsFragment.kt b/app/src/main/java/com/huanchengfly/tieba/post/fragments/SettingsFragment.kt index 5d599015..205aba93 100644 --- a/app/src/main/java/com/huanchengfly/tieba/post/fragments/SettingsFragment.kt +++ b/app/src/main/java/com/huanchengfly/tieba/post/fragments/SettingsFragment.kt @@ -197,7 +197,7 @@ class SettingsFragment : PreferencesFragment() { } timePickerPreference.summary = attachContext.getString( R.string.summary_auto_sign_time, - preferenceManager.sharedPreferences.getString("auto_sign_time", "09:00") + preferenceManager.sharedPreferences!!.getString("auto_sign_time", "09:00") ) val clearCache = findPreference("clear_cache") clearCache!!.summary = attachContext.getString( @@ -216,7 +216,7 @@ class SettingsFragment : PreferencesFragment() { true } val littleTaliPreference = findPreference("little_tail") - val littleTali = preferenceManager.sharedPreferences.getString("little_tail", "") + val littleTali = preferenceManager.sharedPreferences!!.getString("little_tail", "") if (littleTali!!.isEmpty()) { littleTaliPreference!!.setSummary(R.string.tip_no_little_tail) } else { @@ -238,7 +238,7 @@ class SettingsFragment : PreferencesFragment() { val aboutPreference = findPreference("about") val useCustomTabs = findPreference("use_custom_tabs") useCustomTabs!!.isEnabled = - !preferenceManager.sharedPreferences.getBoolean("use_webview", true) + !preferenceManager.sharedPreferences!!.getBoolean("use_webview", true) findPreference("use_webview")!!.onPreferenceChangeListener = Preference.OnPreferenceChangeListener { _: Preference?, newValue: Any? -> useCustomTabs.isEnabled = !(newValue as Boolean) @@ -281,13 +281,14 @@ class SettingsFragment : PreferencesFragment() { switchPreference: SwitchPreference?, defValue: Boolean = false ) { - val value = preferenceManager.sharedPreferences.getBoolean(switchPreference!!.key, defValue) + val value = + preferenceManager.sharedPreferences!!.getBoolean(switchPreference!!.key, defValue) switchPreference.isChecked = value } private fun initListPreference(key: String, defValue: String) { val listPreference = findPreference(key) - val value = preferenceManager.sharedPreferences.getString(key, defValue) + val value = preferenceManager.sharedPreferences!!.getString(key, defValue) listPreference!!.value = value } diff --git a/app/src/main/res/layout/activity_app_font_size.xml b/app/src/main/res/layout/activity_app_font_size.xml index d19e1b29..ba71b0d4 100644 --- a/app/src/main/res/layout/activity_app_font_size.xml +++ b/app/src/main/res/layout/activity_app_font_size.xml @@ -30,7 +30,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/bg_radius_10dp" - android:backgroundTint="@color/default_color_card" + app:backgroundTint="@color/default_color_card" android:gravity="center_horizontal" android:orientation="vertical" android:padding="16dp" diff --git a/app/src/main/res/layout/activity_theme_color.xml b/app/src/main/res/layout/activity_theme_color.xml index 5bafb044..70410f9a 100644 --- a/app/src/main/res/layout/activity_theme_color.xml +++ b/app/src/main/res/layout/activity_theme_color.xml @@ -191,7 +191,7 @@ android:layout_margin="8dp" android:layout_marginTop="0dp" android:background="@drawable/bg_radius_10dp" - android:backgroundTint="@color/default_color_card" + app:backgroundTint="@color/default_color_card" android:paddingStart="16dp" android:paddingEnd="16dp" app:layout_constraintBottom_toBottomOf="parent" diff --git a/application.properties b/application.properties index 0a9985c5..c95e8ecc 100644 --- a/application.properties +++ b/application.properties @@ -1,5 +1,5 @@ -versionCode=39009 +versionCode=39010 versionName=4.0.0 isPerRelease=true preReleaseName=dev -preReleaseVer=9 \ No newline at end of file +preReleaseVer=10 \ No newline at end of file