mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 09:08:52 -06:00
SettingsFragment: Minor changes to theme
This commit is contained in:
@@ -27,6 +27,7 @@ import android.os.Build.VERSION.SDK_INT
|
|||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.provider.Settings
|
import android.provider.Settings
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
|
import android.view.View
|
||||||
import androidx.preference.ListPreference
|
import androidx.preference.ListPreference
|
||||||
import androidx.preference.Preference
|
import androidx.preference.Preference
|
||||||
import androidx.preference.PreferenceCategory
|
import androidx.preference.PreferenceCategory
|
||||||
@@ -43,6 +44,7 @@ import org.isoron.uhabits.core.ui.NotificationTray
|
|||||||
import org.isoron.uhabits.core.utils.DateUtils.Companion.getLongWeekdayNames
|
import org.isoron.uhabits.core.utils.DateUtils.Companion.getLongWeekdayNames
|
||||||
import org.isoron.uhabits.notifications.AndroidNotificationTray.Companion.createAndroidNotificationChannel
|
import org.isoron.uhabits.notifications.AndroidNotificationTray.Companion.createAndroidNotificationChannel
|
||||||
import org.isoron.uhabits.notifications.RingtoneManager
|
import org.isoron.uhabits.notifications.RingtoneManager
|
||||||
|
import org.isoron.uhabits.utils.StyledResources
|
||||||
import org.isoron.uhabits.widgets.WidgetUpdater
|
import org.isoron.uhabits.widgets.WidgetUpdater
|
||||||
import java.util.Calendar
|
import java.util.Calendar
|
||||||
|
|
||||||
@@ -84,6 +86,12 @@ class SettingsFragment : PreferenceFragmentCompat(), OnSharedPreferenceChangeLis
|
|||||||
super.onPause()
|
super.onPause()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
val sr = StyledResources(context!!)
|
||||||
|
view.setBackgroundColor(sr.getColor(R.attr.contrast0))
|
||||||
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
}
|
||||||
|
|
||||||
override fun onPreferenceTreeClick(preference: Preference): Boolean {
|
override fun onPreferenceTreeClick(preference: Preference): Boolean {
|
||||||
val key = preference.key ?: return false
|
val key = preference.key ?: return false
|
||||||
if (key == "reminderSound") {
|
if (key == "reminderSound") {
|
||||||
|
|||||||
Reference in New Issue
Block a user