feat: 优化代码

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

@ -1,6 +1,7 @@
package io.legado.app.ui.config
import android.content.SharedPreferences
import android.os.Build
import android.os.Bundle
import android.view.View
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.theme.ATH
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.utils.*
@ -27,6 +27,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))
}
upPreferenceSummary("barElevation", AppConfig.elevation.toString())
}

Loading…
Cancel
Save