Code refactor

main
h4h13 2019-04-20 15:37:01 +05:30
parent b0605ff183
commit 1016971118
1 changed files with 1 additions and 22 deletions

View File

@ -14,31 +14,10 @@ import code.name.monkey.retromusic.util.PreferenceUtil
import kotlinx.android.synthetic.main.activity_settings.*
class SettingsActivity : AbsBaseActivity(), /*ColorChooserDialog.ColorCallback,*/ SharedPreferences.OnSharedPreferenceChangeListener {
class SettingsActivity : AbsBaseActivity(), SharedPreferences.OnSharedPreferenceChangeListener {
private val fragmentManager = supportFragmentManager
/* override fun onColorSelection(dialog: ColorChooserDialog, @ColorInt selectedColor: Int) {
when (dialog.title) {
R.string.primary_color -> {
val theme = if (ColorUtil.isColorLight(selectedColor))
PreferenceUtil.getThemeResFromPrefValue("light")
else
PreferenceUtil.getThemeResFromPrefValue("dark")
ThemeStore.editTheme(this).activityTheme(theme).primaryColor(selectedColor).commit()
}
R.string.accent_color -> ThemeStore.editTheme(this).accentColor(selectedColor).commit()
}
if (VersionUtils.hasNougatMR())
DynamicShortcutManager(this).updateDynamicShortcuts()
recreate()
}
override fun onColorChooserDismissed(dialog: ColorChooserDialog) {
}*/
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_settings)