|
|
@ -1,6 +1,7 @@ |
|
|
|
package io.legado.app.ui.config |
|
|
|
package io.legado.app.ui.config |
|
|
|
|
|
|
|
|
|
|
|
import android.content.SharedPreferences |
|
|
|
import android.content.SharedPreferences |
|
|
|
|
|
|
|
import android.os.Build |
|
|
|
import android.os.Bundle |
|
|
|
import android.os.Bundle |
|
|
|
import android.view.View |
|
|
|
import android.view.View |
|
|
|
import androidx.preference.Preference |
|
|
|
import androidx.preference.Preference |
|
|
@ -16,7 +17,6 @@ import io.legado.app.lib.dialogs.noButton |
|
|
|
import io.legado.app.lib.dialogs.yesButton |
|
|
|
import io.legado.app.lib.dialogs.yesButton |
|
|
|
import io.legado.app.lib.theme.ATH |
|
|
|
import io.legado.app.lib.theme.ATH |
|
|
|
import io.legado.app.lib.theme.ColorUtils |
|
|
|
import io.legado.app.lib.theme.ColorUtils |
|
|
|
import io.legado.app.lib.theme.elevation |
|
|
|
|
|
|
|
import io.legado.app.ui.widget.number.NumberPickerDialog |
|
|
|
import io.legado.app.ui.widget.number.NumberPickerDialog |
|
|
|
import io.legado.app.utils.* |
|
|
|
import io.legado.app.utils.* |
|
|
|
|
|
|
|
|
|
|
@ -27,6 +27,9 @@ class ThemeConfigFragment : PreferenceFragmentCompat(), SharedPreferences.OnShar |
|
|
|
|
|
|
|
|
|
|
|
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { |
|
|
|
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { |
|
|
|
addPreferencesFromResource(R.xml.pref_config_theme) |
|
|
|
addPreferencesFromResource(R.xml.pref_config_theme) |
|
|
|
|
|
|
|
if (Build.VERSION.SDK_INT < 26) { |
|
|
|
|
|
|
|
preferenceScreen.removePreference(findPreference(PreferKey.launcherIcon)) |
|
|
|
|
|
|
|
} |
|
|
|
upPreferenceSummary("barElevation", AppConfig.elevation.toString()) |
|
|
|
upPreferenceSummary("barElevation", AppConfig.elevation.toString()) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|