mirror of https://github.com/Corewala/Buran
Stop changing settings page color, since it always has no background on restart.
Signed-off-by: Ariel Costas <arielcostas@mailbox.org>
This commit is contained in:
parent
11ffe839f9
commit
eabfd666b6
|
@ -6,7 +6,6 @@ import android.content.Intent
|
|||
import android.content.SharedPreferences
|
||||
import android.content.pm.PackageManager
|
||||
import android.graphics.Color
|
||||
import android.graphics.drawable.ColorDrawable
|
||||
import android.net.Uri
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
|
@ -299,17 +298,6 @@ class SettingsFragment: PreferenceFragmentCompat(), Preference.OnPreferenceChang
|
|||
true
|
||||
}
|
||||
|
||||
// Receives the ColorSheet color code, converts to hex and if it's a color sets it for the current view
|
||||
backgroundColourPreference.setOnPreferenceChangeListener { _, colour ->
|
||||
val hex = ColorSheetUtils.colorToHex(colour as Int)
|
||||
when (colour) {
|
||||
ColorSheet.NO_COLOR -> this.view?.background = null
|
||||
else -> this.view?.background = ColorDrawable(Color.parseColor("$hex"))
|
||||
}
|
||||
|
||||
true
|
||||
}
|
||||
|
||||
appearanceCategory.addPreference(backgroundColourPreference)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue