feat: 优化代码

pull/379/head
kunfei 5 years ago
parent bc06effc6a
commit f6d010923b
  1. 5
      app/src/main/java/io/legado/app/ui/config/ThemeConfigFragment.kt

@ -18,6 +18,7 @@ import io.legado.app.lib.dialogs.yesButton
import io.legado.app.lib.theme.ATH
import io.legado.app.lib.theme.ColorUtils
import io.legado.app.ui.widget.number.NumberPickerDialog
import io.legado.app.ui.widget.prefs.IconListPreference
import io.legado.app.utils.*
@ -28,7 +29,9 @@ class ThemeConfigFragment : PreferenceFragmentCompat(), SharedPreferences.OnShar
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
addPreferencesFromResource(R.xml.pref_config_theme)
if (Build.VERSION.SDK_INT < 26) {
preferenceScreen.removePreference(findPreference(PreferKey.launcherIcon))
findPreference<IconListPreference>(PreferKey.launcherIcon)?.let {
preferenceScreen.removePreference(it)
}
}
upPreferenceSummary("barElevation", AppConfig.elevation.toString())
}

Loading…
Cancel
Save