Change setting ripple color
Change the ripple on the settings to a generally neutral color instead of the gaudy colorPrimary.
This commit is contained in:
parent
e15df4ce73
commit
59036a2747
23 changed files with 169 additions and 77 deletions
|
@ -89,13 +89,17 @@ dependencies {
|
||||||
implementation 'io.coil-kt:coil:0.13.0'
|
implementation 'io.coil-kt:coil:0.13.0'
|
||||||
|
|
||||||
// Material
|
// Material
|
||||||
implementation 'com.google.android.material:material:1.3.0-alpha03'
|
implementation 'com.google.android.material:material:1.3.0-alpha04'
|
||||||
|
|
||||||
// Fast-Scroll
|
// Fast-Scroll
|
||||||
implementation 'com.reddit:indicator-fast-scroll:1.3.0'
|
implementation 'com.reddit:indicator-fast-scroll:1.3.0'
|
||||||
|
|
||||||
|
// Dialogs
|
||||||
implementation 'com.afollestad.material-dialogs:core:3.3.0'
|
implementation 'com.afollestad.material-dialogs:core:3.3.0'
|
||||||
|
|
||||||
|
// Edge-To-Edge
|
||||||
|
implementation 'de.halfbit:edge-to-edge:0.10'
|
||||||
|
|
||||||
// --- DEV ---
|
// --- DEV ---
|
||||||
|
|
||||||
// Lint
|
// Lint
|
||||||
|
|
2
app/proguard-rules.pro
vendored
2
app/proguard-rules.pro
vendored
|
@ -22,4 +22,4 @@
|
||||||
|
|
||||||
-dontobfuscate
|
-dontobfuscate
|
||||||
|
|
||||||
-keep class org.oxycblt.auxio.settings.SettingListFragment
|
-keep class org.oxycblt.auxio.settings.SettingsListFragment
|
|
@ -26,8 +26,8 @@ import org.oxycblt.auxio.ui.accent
|
||||||
import org.oxycblt.auxio.ui.toColor
|
import org.oxycblt.auxio.ui.toColor
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A source code copy of [com.reddit.indicatorfastscroll.FastScrollerThumbView] that fixes a
|
* A semi-copy, semi-custom implementation of [com.reddit.indicatorfastscroll.FastScrollerThumbView]
|
||||||
* memory leak that occurs from having nested fragments. All credit goes to the authors of
|
* that fixes a memory leak that occurs from a bug fix they added. All credit goes to the authors of
|
||||||
* the fast scroll library.
|
* the fast scroll library.
|
||||||
* <a href="https://github.com/reddit/IndicatorFastScroll"> Link to repo </a>
|
* <a href="https://github.com/reddit/IndicatorFastScroll"> Link to repo </a>
|
||||||
* @author Reddit, OxygenCobalt
|
* @author Reddit, OxygenCobalt
|
||||||
|
@ -81,7 +81,11 @@ class NoLeakThumbView @JvmOverloads constructor(
|
||||||
fastScrollerView.onTouchEvent(event)
|
fastScrollerView.onTouchEvent(event)
|
||||||
fastScrollerView.performClick()
|
fastScrollerView.performClick()
|
||||||
|
|
||||||
if (event.actionMasked in intArrayOf(MotionEvent.ACTION_UP, MotionEvent.ACTION_CANCEL)) {
|
if (event.actionMasked in intArrayOf(
|
||||||
|
MotionEvent.ACTION_UP,
|
||||||
|
MotionEvent.ACTION_CANCEL
|
||||||
|
)
|
||||||
|
) {
|
||||||
isActivated = false
|
isActivated = false
|
||||||
return@setOnTouchListener true
|
return@setOnTouchListener true
|
||||||
}
|
}
|
||||||
|
@ -104,15 +108,9 @@ class NoLeakThumbView @JvmOverloads constructor(
|
||||||
|
|
||||||
fastScrollerView.apply {
|
fastScrollerView.apply {
|
||||||
children.forEach { view ->
|
children.forEach { view ->
|
||||||
if (view.containsY(touchY)) {
|
if (view.containsY(touchY) && (view is ImageView || view is TextView)) {
|
||||||
when (view) {
|
|
||||||
is ImageView -> {
|
|
||||||
consumed = true
|
consumed = true
|
||||||
}
|
return@forEach
|
||||||
is TextView -> {
|
|
||||||
consumed = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,17 @@
|
||||||
package org.oxycblt.auxio.settings
|
package org.oxycblt.auxio.settings
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
import androidx.appcompat.app.AppCompatDelegate
|
import androidx.appcompat.app.AppCompatDelegate
|
||||||
import androidx.fragment.app.activityViewModels
|
import androidx.fragment.app.activityViewModels
|
||||||
import androidx.preference.Preference
|
import androidx.preference.Preference
|
||||||
import androidx.preference.PreferenceFragmentCompat
|
import androidx.preference.PreferenceFragmentCompat
|
||||||
|
import androidx.preference.PreferenceGroupAdapter
|
||||||
|
import androidx.preference.PreferenceScreen
|
||||||
|
import androidx.preference.PreferenceViewHolder
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import com.afollestad.materialdialogs.MaterialDialog
|
import com.afollestad.materialdialogs.MaterialDialog
|
||||||
|
@ -18,12 +23,15 @@ import org.oxycblt.auxio.ui.ACCENTS
|
||||||
import org.oxycblt.auxio.ui.accent
|
import org.oxycblt.auxio.ui.accent
|
||||||
import org.oxycblt.auxio.ui.getDetailedAccentSummary
|
import org.oxycblt.auxio.ui.getDetailedAccentSummary
|
||||||
|
|
||||||
class SettingListFragment : PreferenceFragmentCompat() {
|
class SettingsListFragment : PreferenceFragmentCompat() {
|
||||||
private val settingsModel: SettingsViewModel by activityViewModels()
|
private val settingsModel: SettingsViewModel by activityViewModels()
|
||||||
|
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
|
||||||
|
view.apply {
|
||||||
|
}
|
||||||
|
|
||||||
val themePref = findPreference<Preference>(SettingsManager.Keys.KEY_THEME)?.apply {
|
val themePref = findPreference<Preference>(SettingsManager.Keys.KEY_THEME)?.apply {
|
||||||
setIcon(
|
setIcon(
|
||||||
when (AppCompatDelegate.getDefaultNightMode()) {
|
when (AppCompatDelegate.getDefaultNightMode()) {
|
||||||
|
@ -80,9 +88,33 @@ class SettingListFragment : PreferenceFragmentCompat() {
|
||||||
setPreferencesFromResource(R.xml.prefs_main, rootKey)
|
setPreferencesFromResource(R.xml.prefs_main, rootKey)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Forcefully override the adapter creation process so I can get rid of the ugly
|
||||||
|
// colorPrimary ripples.
|
||||||
|
@SuppressLint("RestrictedApi")
|
||||||
|
override fun onCreateAdapter(preferenceScreen: PreferenceScreen?): RecyclerView.Adapter<*> {
|
||||||
|
return object : PreferenceGroupAdapter(preferenceScreen) {
|
||||||
|
override fun onCreateViewHolder(
|
||||||
|
parent: ViewGroup,
|
||||||
|
viewType: Int
|
||||||
|
): PreferenceViewHolder {
|
||||||
|
val holder = super.onCreateViewHolder(parent, viewType)
|
||||||
|
|
||||||
|
if (holder.itemView.id != android.R.id.title) {
|
||||||
|
holder.itemView.setBackgroundResource(R.drawable.ui_ripple)
|
||||||
|
}
|
||||||
|
|
||||||
|
return holder
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun offLoad(something: String) {
|
||||||
|
Log.d(this::class.simpleName, something)
|
||||||
|
}
|
||||||
|
|
||||||
private fun showAccentDialog() {
|
private fun showAccentDialog() {
|
||||||
MaterialDialog(requireActivity()).show {
|
MaterialDialog(requireActivity()).show {
|
||||||
title(R.string.label_settings_accent)
|
title(R.string.setting_accent)
|
||||||
|
|
||||||
// Roll my own RecyclerView since [To no surprise whatsoever] Material Dialogs
|
// Roll my own RecyclerView since [To no surprise whatsoever] Material Dialogs
|
||||||
// has a bug where ugly dividers will show with the RecyclerView even if you disable them.
|
// has a bug where ugly dividers will show with the RecyclerView even if you disable them.
|
|
@ -14,7 +14,8 @@ import org.oxycblt.auxio.ui.ACCENTS
|
||||||
* the first time it occurs.
|
* the first time it occurs.
|
||||||
* @author OxygenCobalt
|
* @author OxygenCobalt
|
||||||
*/
|
*/
|
||||||
class SettingsManager private constructor(context: Context) : SharedPreferences.OnSharedPreferenceChangeListener {
|
class SettingsManager private constructor(context: Context) :
|
||||||
|
SharedPreferences.OnSharedPreferenceChangeListener {
|
||||||
private val sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context)
|
private val sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context)
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
@ -79,6 +80,10 @@ class SettingsManager private constructor(context: Context) : SharedPreferences.
|
||||||
) ?: SortMode.ALPHA_DOWN
|
) ?: SortMode.ALPHA_DOWN
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun getEdgeToEdge(): Boolean {
|
||||||
|
return sharedPrefs.getBoolean(Keys.KEY_EDGE_TO_EDGE, false)
|
||||||
|
}
|
||||||
|
|
||||||
// --- OVERRIDES ---
|
// --- OVERRIDES ---
|
||||||
|
|
||||||
override fun onSharedPreferenceChanged(sharedPreferences: SharedPreferences?, key: String?) {
|
override fun onSharedPreferenceChanged(sharedPreferences: SharedPreferences?, key: String?) {
|
||||||
|
@ -124,6 +129,7 @@ class SettingsManager private constructor(context: Context) : SharedPreferences.
|
||||||
const val KEY_LIBRARY_SORT_MODE = "KEY_LIBRARY_SORT_MODE"
|
const val KEY_LIBRARY_SORT_MODE = "KEY_LIBRARY_SORT_MODE"
|
||||||
const val KEY_THEME = "KEY_THEME"
|
const val KEY_THEME = "KEY_THEME"
|
||||||
const val KEY_ACCENT = "KEY_ACCENT"
|
const val KEY_ACCENT = "KEY_ACCENT"
|
||||||
|
const val KEY_EDGE_TO_EDGE = "KEY_EDGE"
|
||||||
}
|
}
|
||||||
|
|
||||||
private object Theme {
|
private object Theme {
|
||||||
|
@ -133,11 +139,12 @@ class SettingsManager private constructor(context: Context) : SharedPreferences.
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A safe interface for receiving preference updates, use this instead of
|
* An interface for receiving some settings updates.
|
||||||
* [SharedPreferences.OnSharedPreferenceChangeListener].
|
* [SharedPreferences.OnSharedPreferenceChangeListener].
|
||||||
*/
|
*/
|
||||||
interface Callback {
|
interface Callback {
|
||||||
fun onThemeUpdate(newTheme: Int) {}
|
fun onThemeUpdate(newTheme: Int) {}
|
||||||
fun onAccentUpdate(newAccent: Pair<Int, Int>) {}
|
fun onAccentUpdate(newAccent: Pair<Int, Int>) {}
|
||||||
|
fun onEdgeToEdgeUpdate(isEdgeToEdge: Boolean) {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package org.oxycblt.auxio.settings.adapters
|
package org.oxycblt.auxio.settings.adapters
|
||||||
|
|
||||||
import android.content.res.ColorStateList
|
import android.content.res.ColorStateList
|
||||||
import android.util.Log
|
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
@ -9,6 +8,7 @@ import org.oxycblt.auxio.R
|
||||||
import org.oxycblt.auxio.databinding.ItemAccentBinding
|
import org.oxycblt.auxio.databinding.ItemAccentBinding
|
||||||
import org.oxycblt.auxio.ui.ACCENTS
|
import org.oxycblt.auxio.ui.ACCENTS
|
||||||
import org.oxycblt.auxio.ui.accent
|
import org.oxycblt.auxio.ui.accent
|
||||||
|
import org.oxycblt.auxio.ui.getAccentItemSummary
|
||||||
import org.oxycblt.auxio.ui.toColor
|
import org.oxycblt.auxio.ui.toColor
|
||||||
|
|
||||||
class AccentAdapter(
|
class AccentAdapter(
|
||||||
|
@ -29,20 +29,25 @@ class AccentAdapter(
|
||||||
) : RecyclerView.ViewHolder(binding.root) {
|
) : RecyclerView.ViewHolder(binding.root) {
|
||||||
|
|
||||||
fun bind(accentData: Pair<Int, Int>) {
|
fun bind(accentData: Pair<Int, Int>) {
|
||||||
binding.accent.setOnClickListener {
|
binding.accent.apply {
|
||||||
Log.d(this::class.simpleName, accentData.toString())
|
contentDescription = getAccentItemSummary(context, accentData)
|
||||||
|
|
||||||
|
setOnClickListener {
|
||||||
doOnAccentConfirm(accentData)
|
doOnAccentConfirm(accentData)
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.accent.apply {
|
imageTintList = if (accentData.first == accent.first) {
|
||||||
imageTintList = if (accentData.first != accent.first) {
|
isEnabled = false
|
||||||
ColorStateList.valueOf(
|
|
||||||
android.R.color.transparent.toColor(context)
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
ColorStateList.valueOf(
|
ColorStateList.valueOf(
|
||||||
R.color.background.toColor(context)
|
R.color.background.toColor(context)
|
||||||
)
|
)
|
||||||
|
} else {
|
||||||
|
isEnabled = true
|
||||||
|
|
||||||
|
ColorStateList.valueOf(
|
||||||
|
android.R.color.transparent.toColor(context)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
backgroundTintList = ColorStateList.valueOf(
|
backgroundTintList = ColorStateList.valueOf(
|
||||||
|
|
|
@ -129,7 +129,8 @@ class SongsFragment : Fragment(), SearchView.OnQueryTextListener {
|
||||||
|
|
||||||
useDefaultScroller = false
|
useDefaultScroller = false
|
||||||
|
|
||||||
itemIndicatorSelectedCallbacks.add(object : FastScrollerView.ItemIndicatorSelectedCallback {
|
itemIndicatorSelectedCallbacks.add(object :
|
||||||
|
FastScrollerView.ItemIndicatorSelectedCallback {
|
||||||
override fun onItemIndicatorSelected(
|
override fun onItemIndicatorSelected(
|
||||||
indicator: FastScrollItemIndicator,
|
indicator: FastScrollItemIndicator,
|
||||||
indicatorCenterY: Int,
|
indicatorCenterY: Int,
|
||||||
|
|
|
@ -93,6 +93,7 @@ fun PopupMenu.setupSongActions(song: Song, context: Context, playbackModel: Play
|
||||||
}
|
}
|
||||||
inflateAndShow(R.menu.menu_song_actions)
|
inflateAndShow(R.menu.menu_song_actions)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show actions for a song item, such as the ones found in [org.oxycblt.auxio.songs.SongsFragment]
|
* Show actions for a song item, such as the ones found in [org.oxycblt.auxio.songs.SongsFragment]
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,6 +4,5 @@
|
||||||
<size
|
<size
|
||||||
android:width="48dp"
|
android:width="48dp"
|
||||||
android:height="48dp" />
|
android:height="48dp" />
|
||||||
<solid
|
<solid android:color="@android:color/white" />
|
||||||
android:color="@android:color/white" />
|
|
||||||
</shape>
|
</shape>
|
|
@ -16,12 +16,12 @@
|
||||||
android:elevation="@dimen/elevation_normal"
|
android:elevation="@dimen/elevation_normal"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:title="@string/label_settings"
|
app:title="@string/setting_title"
|
||||||
app:titleTextAppearance="@style/TextAppearance.Toolbar.Header" />
|
app:titleTextAppearance="@style/TextAppearance.Toolbar.Header" />
|
||||||
|
|
||||||
<androidx.fragment.app.FragmentContainerView
|
<androidx.fragment.app.FragmentContainerView
|
||||||
android:id="@+id/settings_list_fragment"
|
android:id="@+id/settings_list_fragment"
|
||||||
android:name="org.oxycblt.auxio.settings.SettingListFragment"
|
android:name="org.oxycblt.auxio.settings.SettingsListFragment"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
<data>
|
<data>
|
||||||
|
|
||||||
</data>
|
</data>
|
||||||
|
@ -9,6 +10,7 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="@dimen/margin_mid_small">
|
android:padding="@dimen/margin_mid_small">
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/accent"
|
android:id="@+id/accent"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<TextView
|
<TextView android:id="@android:id/title"
|
||||||
android:id="@android:id/title"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
|
|
|
@ -10,6 +10,6 @@
|
||||||
android:icon="@drawable/ic_song" />
|
android:icon="@drawable/ic_song" />
|
||||||
<item
|
<item
|
||||||
android:id="@+id/settings_fragment"
|
android:id="@+id/settings_fragment"
|
||||||
android:title="@string/label_settings"
|
android:title="@string/setting_title"
|
||||||
android:icon="@drawable/ic_settings" />
|
android:icon="@drawable/ic_settings" />
|
||||||
</menu>
|
</menu>
|
|
@ -1,9 +1,9 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<array name="theme_entries">
|
<array name="theme_entries">
|
||||||
<item>@string/label_settings_theme_auto</item>
|
<item>@string/setting_theme_auto</item>
|
||||||
<item>@string/label_settings_theme_light</item>
|
<item>@string/setting_theme_day</item>
|
||||||
<item>@string/label_settings_theme_dark</item>
|
<item>@string/setting_theme_night</item>
|
||||||
</array>
|
</array>
|
||||||
|
|
||||||
<array name="theme_values">
|
<array name="theme_values">
|
||||||
|
|
|
@ -27,14 +27,18 @@
|
||||||
<string name="label_next_user_queue">Next in Queue</string>
|
<string name="label_next_user_queue">Next in Queue</string>
|
||||||
<string name="label_channel">Music Playback</string>
|
<string name="label_channel">Music Playback</string>
|
||||||
<string name="label_service_playback">The music playback service for Auxio.</string>
|
<string name="label_service_playback">The music playback service for Auxio.</string>
|
||||||
<string name="label_settings">Settings</string>
|
|
||||||
<string name="label_settings_ui">Appearance</string>
|
<!-- Settings namespace | Settings-related labels -->
|
||||||
<string name="label_settings_theme">Theme</string>
|
<string name="setting_title">Settings</string>
|
||||||
<string name="label_settings_theme_auto">Automatic</string>
|
<string name="setting_ui">Appearance</string>
|
||||||
<string name="label_settings_theme_light">Light</string>
|
<string name="setting_theme">Theme</string>
|
||||||
<string name="label_settings_theme_dark">Dark</string>
|
<string name="setting_theme_auto">Automatic</string>
|
||||||
<string name="label_settings_theme_choose">Choose theme</string>
|
<string name="setting_theme_day">Light</string>
|
||||||
<string name="label_settings_accent">Accent</string>
|
<string name="setting_theme_night">Dark</string>
|
||||||
|
<string name="setting_accent">Accent</string>
|
||||||
|
<string name="setting_edge">Edge-To-Edge</string>
|
||||||
|
<string name="setting_edge_desc_on">Disable edge-to-edge</string>
|
||||||
|
<string name="setting_edge_desc_off">Enable edge-to-edge</string>
|
||||||
|
|
||||||
<!-- Debug Namespace | Debug labels -->
|
<!-- Debug Namespace | Debug labels -->
|
||||||
<string name="debug_state_saved">State saved</string>
|
<string name="debug_state_saved">State saved</string>
|
||||||
|
|
|
@ -13,12 +13,17 @@
|
||||||
<item name="colorControlNormal">@color/control_color</item>
|
<item name="colorControlNormal">@color/control_color</item>
|
||||||
<item name="alertDialogTheme">@style/Theme.CustomDialog</item>
|
<item name="alertDialogTheme">@style/Theme.CustomDialog</item>
|
||||||
<item name="indicatorFastScrollerStyle">@style/FastScrollTheme</item>
|
<item name="indicatorFastScrollerStyle">@style/FastScrollTheme</item>
|
||||||
|
<item name="colorControlActivated">?attr/colorPrimary</item>
|
||||||
|
<item name="colorControlHighlight">?attr/colorPrimary</item>
|
||||||
|
<item name="preferenceTheme">@style/Theme.Preference</item>
|
||||||
|
|
||||||
<item name="md_divider_color">@android:color/transparent</item>
|
<item name="md_divider_color">@android:color/transparent</item>
|
||||||
<item name="md_background_color">@color/background</item>
|
<item name="md_background_color">@color/background</item>
|
||||||
<item name="md_corner_radius">0dp</item>
|
<item name="md_corner_radius">0dp</item>
|
||||||
<item name="md_color_button_text">@color/control_color</item>
|
<item name="md_color_button_text">@color/control_color</item>
|
||||||
<item name="md_font_title">@font/inter_black</item>
|
<item name="md_font_title">@font/inter_black</item>
|
||||||
|
|
||||||
|
<item name="android:activatedBackgroundIndicator">@drawable/ui_ripple</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!-- Hack to fix the weird icon/underline with LibraryFragment's SearchView -->
|
<!-- Hack to fix the weird icon/underline with LibraryFragment's SearchView -->
|
||||||
|
@ -83,6 +88,12 @@
|
||||||
<item name="android:textSize">18sp</item>
|
<item name="android:textSize">18sp</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="Theme.Preference" parent="PreferenceThemeOverlay">
|
||||||
|
<item name="rippleColor">@color/selection_color</item>
|
||||||
|
<item name="itemRippleColor">@color/selection_color</item>
|
||||||
|
<item name="tabRippleColor">@color/selection_color</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Fix to get QueueFragment to not overlap the Status Bar or Navigation Bar [Currently unused but still here]
|
Fix to get QueueFragment to not overlap the Status Bar or Navigation Bar [Currently unused but still here]
|
||||||
https://stackoverflow.com/a/57790787/14143986
|
https://stackoverflow.com/a/57790787/14143986
|
||||||
|
|
30
app/src/main/res/xml-v27/prefs_main.xml
Normal file
30
app/src/main/res/xml-v27/prefs_main.xml
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
<PreferenceCategory
|
||||||
|
android:title="@string/setting_ui"
|
||||||
|
android:layout="@layout/item_prefs_header">
|
||||||
|
<ListPreference
|
||||||
|
app:key="KEY_THEME"
|
||||||
|
android:title="@string/setting_theme"
|
||||||
|
android:icon="@drawable/ic_day"
|
||||||
|
android:entries="@array/theme_entries"
|
||||||
|
android:entryValues="@array/theme_values"
|
||||||
|
app:defaultValue="AUTO"
|
||||||
|
app:useSimpleSummaryProvider="true" />
|
||||||
|
|
||||||
|
<Preference
|
||||||
|
app:key="KEY_ACCENT"
|
||||||
|
android:title="@string/setting_accent"
|
||||||
|
android:icon="@drawable/ic_accent"
|
||||||
|
app:summary="@string/setting_accent" />
|
||||||
|
|
||||||
|
<SwitchPreferenceCompat
|
||||||
|
app:key="KEY_EDGE"
|
||||||
|
android:title="@string/setting_edge"
|
||||||
|
app:summaryOn="@string/setting_edge_desc_on"
|
||||||
|
app:summaryOff="@string/setting_edge_desc_off"
|
||||||
|
app:iconSpaceReserved="false"
|
||||||
|
android:defaultValue="false" />
|
||||||
|
</PreferenceCategory>
|
||||||
|
</PreferenceScreen>
|
|
@ -2,11 +2,11 @@
|
||||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
android:title="@string/label_settings_ui"
|
android:title="@string/setting_ui"
|
||||||
android:layout="@layout/item_prefs_header">
|
android:layout="@layout/item_prefs_header">
|
||||||
<ListPreference
|
<ListPreference
|
||||||
app:key="KEY_THEME"
|
app:key="KEY_THEME"
|
||||||
android:title="@string/label_settings_theme"
|
android:title="@string/setting_theme"
|
||||||
android:icon="@drawable/ic_day"
|
android:icon="@drawable/ic_day"
|
||||||
android:entries="@array/theme_entries"
|
android:entries="@array/theme_entries"
|
||||||
android:entryValues="@array/theme_values"
|
android:entryValues="@array/theme_values"
|
||||||
|
@ -15,9 +15,8 @@
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
app:key="KEY_ACCENT"
|
app:key="KEY_ACCENT"
|
||||||
android:title="@string/label_settings_accent"
|
android:title="@string/setting_accent"
|
||||||
android:icon="@drawable/ic_accent"
|
android:icon="@drawable/ic_accent"
|
||||||
app:summary="@string/label_settings_accent"
|
app:summary="@string/setting_accent" />
|
||||||
app:enableCopying="true" />
|
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
Loading…
Reference in a new issue