Fix settings font

This commit is contained in:
h4h13 2019-11-05 00:13:54 +05:30
parent 3a8f016b62
commit ee83fef6a7
27 changed files with 347 additions and 86 deletions

View file

@ -51,7 +51,7 @@ class ContributorAdapter(
inner class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
val title: TextView = itemView.findViewById(R.id.title)
val text: TextView = itemView.findViewById(R.id.text)
val image: CircularImageView = itemView.findViewById(R.id.image)
val image: CircularImageView = itemView.findViewById(R.id.icon)
internal fun bindData(contributor: Contributor) {
title.text = contributor.name

View file

@ -25,6 +25,7 @@ import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import code.name.monkey.appthemehelper.ThemeStore
import code.name.monkey.appthemehelper.common.prefs.supportv7.ATEDialogPreference
import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.adapter.CategoryInfoAdapter
import code.name.monkey.retromusic.model.CategoryInfo
import code.name.monkey.retromusic.util.PreferenceUtil
@ -58,7 +59,7 @@ class LibraryPreferenceDialog : PreferenceDialogFragmentCompat() {
lateinit var adapter: CategoryInfoAdapter
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
val view = activity!!.layoutInflater.inflate(code.name.monkey.retromusic.R.layout.preference_dialog_library_categories, null)
val view = requireActivity().layoutInflater.inflate(R.layout.preference_dialog_library_categories, null)
val categoryInfos: List<CategoryInfo>
if (savedInstanceState != null) {
@ -68,14 +69,14 @@ class LibraryPreferenceDialog : PreferenceDialogFragmentCompat() {
}
adapter = CategoryInfoAdapter(categoryInfos)
val recyclerView = view.findViewById<RecyclerView>(code.name.monkey.retromusic.R.id.recycler_view)
val recyclerView = view.findViewById<RecyclerView>(R.id.recycler_view)
recyclerView.layoutManager = LinearLayoutManager(activity)
recyclerView.adapter = adapter
adapter.attachToRecyclerView(recyclerView)
return MaterialDialog(requireContext(), BottomSheet(LayoutMode.WRAP_CONTENT))
.title(code.name.monkey.retromusic.R.string.library_categories)
.title(R.string.library_categories)
.cornerRadius(PreferenceUtil.getInstance(requireContext()).dialogCorner)
.customView(view = view)
.positiveButton(android.R.string.ok) {
@ -85,7 +86,7 @@ class LibraryPreferenceDialog : PreferenceDialogFragmentCompat() {
.negativeButton(android.R.string.cancel) {
dismiss()
}
.neutralButton(code.name.monkey.retromusic.R.string.reset_action) {
.neutralButton(R.string.reset_action) {
adapter.categoryInfos = PreferenceUtil.getInstance(requireContext()).defaultLibraryCategoryInfos
}
.noAutoDismiss()

View file

@ -18,8 +18,10 @@ import android.content.Context
import android.util.AttributeSet
import android.view.View
import android.widget.FrameLayout
import androidx.constraintlayout.widget.ConstraintLayout
import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.extensions.hide
import code.name.monkey.retromusic.util.DensityUtil
import kotlinx.android.synthetic.main.list_item_view.view.*
/**
@ -42,7 +44,16 @@ class ListItemView : FrameLayout {
View.inflate(context, R.layout.list_item_view, this)
val typedArray = context.obtainStyledAttributes(attrs, R.styleable.ListItemView)
appCompatImageView.setImageDrawable(typedArray.getDrawable(R.styleable.ListItemView_listItemIcon))
if (typedArray.hasValue(R.styleable.ListItemView_listItemIcon)) {
icon.setImageDrawable(typedArray.getDrawable(R.styleable.ListItemView_listItemIcon))
} else {
val params = title.layoutParams as ConstraintLayout.LayoutParams
val startDP = DensityUtil.dip2px(context, 72.0f)
params.setMargins(startDP, title.paddingTop, title.paddingRight, title.paddingBottom)
summary.setPadding(startDP, title.paddingTop, title.paddingRight, title.paddingBottom)
icon.hide()
}
title.text = typedArray.getText(R.styleable.ListItemView_listItemTitle)
if (typedArray.hasValue(R.styleable.ListItemView_listItemSummary)) {
summary.text = typedArray.getText(R.styleable.ListItemView_listItemSummary)

View file

@ -98,8 +98,8 @@
android:ellipsize="end"
android:gravity="center"
android:maxLines="1"
android:paddingStart="24dp"
android:paddingEnd="24dp"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:textAppearance="@style/TextViewBody2"
app:layout_constraintBottom_toTopOf="@+id/playerMediaControllerContainer"
app:layout_constraintEnd_toEndOf="parent"

View file

@ -84,9 +84,9 @@
android:ellipsize="end"
android:gravity="center"
android:maxLines="1"
android:paddingStart="24dp"
android:paddingTop="12dp"
android:paddingEnd="24dp"
android:paddingStart="16dp"
android:paddingTop="8dp"
android:paddingEnd="16dp"
android:textAppearance="@style/TextViewBody2"
tools:text="@tools:sample/lorem/random" />
</LinearLayout>

View file

@ -100,9 +100,8 @@
android:layout_gravity="center"
android:ellipsize="end"
android:gravity="center"
android:maxLines="1"
android:paddingStart="24dp"
android:paddingEnd="24dp"
android:maxLines="1" android:paddingStart="16dp"
android:paddingEnd="16dp"
android:textAppearance="@style/TextViewBody1"
app:layout_constraintBottom_toTopOf="@+id/playerMediaControllerContainer"
app:layout_constraintEnd_toEndOf="parent"

View file

@ -101,8 +101,8 @@
android:layout_gravity="center"
android:ellipsize="end"
android:gravity="center"
android:maxLines="1"
android:padding="16dp"
android:maxLines="1" android:paddingStart="16dp"
android:paddingEnd="16dp"
android:textAppearance="@style/TextViewBody1"
android:textColor="?android:attr/textColorSecondary"
app:layout_constraintBottom_toTopOf="@+id/playerMediaControllerContainer"

View file

@ -6,7 +6,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
android:orientation="horizontal"
android:paddingBottom="12dp">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/volumeDown"
@ -14,7 +15,8 @@
android:layout_height="wrap_content"
android:layout_weight="0"
android:background="?roundSelector"
android:padding="12dp"
android:paddingStart="12dp"
android:paddingEnd="12dp"
app:srcCompat="@drawable/ic_volume_down_white_24dp"
app:tint="?colorOnBackground" />
@ -36,7 +38,9 @@
android:layout_height="wrap_content"
android:layout_weight="0"
android:background="?roundSelector"
android:padding="12dp"
android:paddingStart="12dp"
android:paddingEnd="12dp"
android:paddingBottom="12dp"
app:srcCompat="@drawable/ic_volume_up_white_24dp"
app:tint="?colorOnBackground" />
</LinearLayout>

View file

@ -12,50 +12,54 @@
~ See the GNU General Public License for more details.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/rectSelector"
android:gravity="center_vertical"
android:minHeight="@dimen/md_listitem_height"
android:minHeight="72dp"
android:orientation="horizontal"
android:paddingStart="12dp"
android:paddingEnd="12dp"
android:padding="12dp"
tools:ignore="PrivateResource">
<code.name.monkey.retromusic.views.CircularImageView
android:id="@+id/image"
android:id="@+id/icon"
android:layout_width="40dp"
android:layout_height="40dp"
app:civ_border="false"
app:civ_shadow="false"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_person_flat"
tools:srcCompat="@tools:sample/backgrounds/scenic[20]" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingStart="16dp"
android:paddingTop="8dp"
android:paddingEnd="16dp"
android:paddingBottom="8dp">
<com.google.android.material.textview.MaterialTextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:textAppearance="@style/TextViewSubtitle1"
android:textStyle="bold"
tools:text="Name" />
app:layout_constrainedWidth="true"
app:layout_constraintBottom_toTopOf="@+id/text"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0"
app:layout_constraintStart_toEndOf="@+id/icon"
tools:text="@tools:sample/lorem" />
<code.name.monkey.retromusic.views.BaselineGridTextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
app:layout_constrainedWidth="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0"
app:layout_constraintStart_toEndOf="@id/icon"
app:lineHeightHint="24sp"
tools:text="Role" />
</LinearLayout>
</LinearLayout>
tools:text="@tools:sample/lorem" />
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -24,7 +24,7 @@
tools:ignore="PrivateResource">
<code.name.monkey.retromusic.views.CircularImageView
android:id="@+id/image"
android:id="@+id/icon"
android:layout_width="72dp"
android:layout_height="72dp"
android:layout_margin="8dp"

View file

@ -18,55 +18,52 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/rectSelector"
android:minHeight="@dimen/md_listitem_height"
android:minHeight="72dp"
android:orientation="horizontal"
android:padding="16dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
tools:ignore="PrivateResource">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/appCompatImageView"
android:id="@android:id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="16dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_telegram_white"
app:tint="?colorOnSurface" />
app:tint="?colorOnSurface"
tools:srcCompat="@drawable/ic_telegram_white" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:id="@android:id/title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:textStyle="bold"
android:layout_marginEnd="16dp"
android:text="@string/telegram_group"
android:textAppearance="@style/TextViewSubtitle1"
app:layout_constrainedWidth="true"
app:layout_constraintBottom_toTopOf="@+id/summary"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0"
app:layout_constraintStart_toEndOf="@+id/appCompatImageView"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintEnd_toStartOf="@android:id/checkbox"
app:layout_constraintStart_toStartOf="@+id/guideline_front_margin"
app:layout_constraintTop_toTopOf="parent"
tools:maxLines="@string/grid_size_1"
tools:text="@tools:sample/lorem" />
<code.name.monkey.retromusic.views.BaselineGridTextView
android:id="@+id/summary"
android:layout_width="wrap_content"
android:id="@android:id/summary"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="4dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="8dp"
android:text="@string/telegram_group_summary"
app:layout_constrainedWidth="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0"
app:layout_constraintStart_toEndOf="@+id/appCompatImageView"
app:layout_constraintTop_toBottomOf="@+id/title" />
app:layout_constraintEnd_toStartOf="@android:id/checkbox"
app:layout_constraintStart_toStartOf="@+id/guideline_front_margin"
app:layout_constraintTop_toBottomOf="@android:id/title"
app:lineHeightHint="24sp"
tools:maxLines="2"
tools:text="@tools:sample/lorem/random" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline_front_margin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_begin="52dp" />
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2019 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/rectSelector"
android:minHeight="72dp"
android:orientation="horizontal"
android:padding="16dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
tools:ignore="PrivateResource">
<androidx.appcompat.widget.AppCompatImageView
android:id="@android:id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:tint="?colorOnSurface"
tools:srcCompat="@drawable/ic_telegram_white" />
<com.google.android.material.textview.MaterialTextView
android:id="@android:id/title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textAppearance="@style/TextViewSubtitle1"
app:layout_constrainedWidth="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@android:id/checkbox"
app:layout_constraintStart_toStartOf="@+id/guideline_front_margin"
app:layout_constraintTop_toTopOf="parent"
tools:maxLines="@string/grid_size_1"
tools:text="@tools:sample/lorem" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline_front_margin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_begin="52dp" />
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2019 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/rectSelector"
android:minHeight="72dp"
android:orientation="horizontal"
android:padding="16dp"
tools:ignore="PrivateResource">
<androidx.appcompat.widget.AppCompatImageView
android:id="@android:id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:tint="?colorOnSurface"
tools:srcCompat="@drawable/ic_telegram_white" />
<com.google.android.material.textview.MaterialTextView
android:id="@android:id/title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingStart="0dp"
android:paddingEnd="16dp"
android:textAppearance="@style/TextViewSubtitle1"
app:layout_constrainedWidth="true"
app:layout_constraintEnd_toStartOf="@android:id/checkbox"
app:layout_constraintStart_toStartOf="@+id/guideline_front_margin"
app:layout_constraintTop_toTopOf="parent"
tools:maxLines="@string/grid_size_1"
tools:text="@tools:sample/lorem" />
<code.name.monkey.retromusic.views.BaselineGridTextView
android:id="@android:id/summary"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingStart="0dp"
android:paddingEnd="16dp"
app:layout_constrainedWidth="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@android:id/checkbox"
app:layout_constraintStart_toStartOf="@+id/guideline_front_margin"
app:layout_constraintTop_toBottomOf="@android:id/title"
app:lineHeightHint="24sp"
tools:maxLines="2"
tools:text="@tools:sample/lorem/random" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline_front_margin"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
app:layout_constraintGuide_begin="52dp" />
<code.name.monkey.appthemehelper.common.views.ATESwitch
android:id="@android:id/checkbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@null"
android:clickable="false"
android:focusable="false"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -0,0 +1,68 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2019 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/rectSelector"
android:orientation="horizontal"
android:padding="16dp"
tools:ignore="PrivateResource">
<androidx.appcompat.widget.AppCompatImageView
android:id="@android:id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:tint="?colorOnSurface"
tools:srcCompat="@drawable/ic_telegram_white" />
<com.google.android.material.textview.MaterialTextView
android:id="@android:id/title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingStart="0dp"
android:paddingEnd="16dp"
android:textAppearance="@style/TextViewSubtitle1"
app:layout_constrainedWidth="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@android:id/checkbox"
app:layout_constraintStart_toStartOf="@+id/guideline_front_margin"
app:layout_constraintTop_toTopOf="parent"
tools:maxLines="@string/grid_size_1"
tools:text="@tools:sample/lorem" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline_front_margin"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
app:layout_constraintGuide_begin="52dp" />
<code.name.monkey.appthemehelper.common.views.ATESwitch
android:id="@android:id/checkbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@null"
android:clickable="false"
android:focusable="false"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -16,6 +16,7 @@
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="false"
android:layout="@layout/list_item_view_switch"
android:key="pause_on_zero_volume"
android:summary="@string/pref_keep_pause_on_zero_volume_summary"
android:title="@string/pref_keep_pause_on_zero_volume_title"
@ -25,6 +26,7 @@
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="false"
android:key="keep_screen_on"
android:layout="@layout/list_item_view_switch"
android:summary="@string/pref_keep_screen_on_summary"
android:title="@string/pref_keep_screen_on_title"
app:enableCopying="true"

View file

@ -5,6 +5,7 @@
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="true"
android:key="audio_ducking"
android:layout="@layout/list_item_view_switch"
android:summary="@string/pref_summary_audio_ducking"
android:title="@string/pref_title_audio_ducking"
app:enableCopying="true"
@ -13,19 +14,22 @@
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="false"
android:key="gapless_playback"
android:layout="@layout/list_item_view_switch"
android:summary="@string/pref_summary_gapless_playback"
android:title="@string/pref_title_gapless_playback"
app:enableCopying="true" />
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreference
app:icon="@drawable/ic_equalizer_white_24dp"
android:key="equalizer"
android:layout="@layout/list_item_view_no_title"
android:title="@string/equalizer"
app:enableCopying="true" />
app:enableCopying="true"
app:icon="@drawable/ic_equalizer_white_24dp" />
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="false"
android:key="toggle_headset"
android:layout="@layout/list_item_view_switch"
android:summary="@string/pref_summary_toggle_headset"
android:title="@string/pref_title_toggle_toggle_headset"
app:enableCopying="true"
@ -34,6 +38,7 @@
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="false"
android:key="toggle_shuffle"
android:layout="@layout/list_item_view_switch"
android:summary="@string/pref_summary_toggle_shuffle"
android:title="@string/pref_title_toggle_toggle_shuffle"
app:enableCopying="true"

View file

@ -6,6 +6,7 @@
<code.name.monkey.retromusic.preferences.BlacklistPreference
android:key="blacklist"
android:layout="@layout/list_item_view"
android:summary="@string/pref_summary_blacklist"
android:title="@string/pref_title_blacklist"
app:enableCopying="true"

View file

@ -4,17 +4,20 @@
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory
android:layout="@layout/preference_category_title"
android:title="@string/pref_header_general">
<code.name.monkey.retromusic.preferences.MaterialListPreference
android:defaultValue="dark"
android:entries="@array/pref_general_theme_list_titles"
android:entryValues="@array/pref_general_theme_list_values"
android:key="general_theme"
android:layout="@layout/list_item_view"
android:title="@string/pref_title_general_theme"
app:enableCopying="true"
app:icon="@drawable/ic_color_lens_white_24dp" />
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:key="black_theme"
android:layout="@layout/list_item_view_switch_no_title"
android:title="@string/black_theme_name"
app:enableCopying="true" />
@ -26,6 +29,7 @@
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATEColorPreference
android:key="accent_color"
android:layout="@layout/list_item_view"
android:persistent="false"
android:summary="@string/accent_color_desc"
android:title="@string/accent_color"
@ -35,6 +39,7 @@
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="false"
android:key="desaturated_color"
android:layout="@layout/list_item_view_switch"
android:summary="@string/pref_summary_desaturated_color"
android:title="@string/pref_title_desaturated_color"
app:enableCopying="true" />
@ -42,6 +47,7 @@
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="false"
android:key="adaptive_color_app"
android:layout="@layout/list_item_view_switch"
android:summary="@string/pref_summary_colored_app"
android:title="@string/pref_title_colored_app"
app:enableCopying="true" />
@ -49,6 +55,7 @@
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="false"
android:key="should_color_app_shortcuts"
android:layout="@layout/list_item_view_switch"
android:summary="@string/pref_summary_colored_app_shortcuts"
android:title="@string/pref_title_app_shortcuts"
app:enableCopying="true" />
@ -56,6 +63,7 @@
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="false"
android:key="dominant_color"
android:layout="@layout/list_item_view_switch"
android:summary="@string/pref_summary_dominant_color"
android:title="@string/pref_title_toggle_dominant_color"
app:enableCopying="true" />

View file

@ -4,17 +4,19 @@
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="false"
app:icon="@drawable/ic_image_white_24dp"
android:key="ignore_media_store_artwork"
android:layout="@layout/list_item_view_switch"
android:summary="@string/pref_summary_ignore_media_store_artwork"
android:title="@string/pref_title_ignore_media_store_artwork"
app:enableCopying="true" />
app:enableCopying="true"
app:icon="@drawable/ic_image_white_24dp" />
<code.name.monkey.retromusic.preferences.MaterialListPreference
android:defaultValue="only_wifi"
android:entries="@array/pref_auto_download_images_titles"
android:entryValues="@array/pref_auto_download_images_values"
android:key="auto_download_images_policy"
android:layout="@layout/list_item_view"
android:title="@string/pref_title_auto_download_artist_images"
app:enableCopying="true" />
</androidx.preference.PreferenceScreen>

View file

@ -7,6 +7,7 @@
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="true"
android:key="album_art_on_lockscreen"
android:layout="@layout/list_item_view_switch"
android:summary="@string/pref_summary_album_art_on_lockscreen"
android:title="@string/pref_title_album_art_on_lockscreen"
app:enableCopying="true" />
@ -15,6 +16,7 @@
android:defaultValue="false"
android:dependency="album_art_on_lockscreen"
android:key="blurred_album_art"
android:layout="@layout/list_item_view_switch"
android:summary="@string/pref_summary_blurred_album_art"
android:title="@string/pref_title_blurred_album_art"
app:enableCopying="true" />
@ -22,6 +24,7 @@
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="false"
android:key="lock_screen"
android:layout="@layout/list_item_view_switch"
android:summary="@string/pref_summary_lock_screen"
android:title="@string/pref_title_lock_screen"
app:enableCopying="true" />

View file

@ -4,6 +4,7 @@
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="false"
android:key="classic_notification"
android:layout="@layout/list_item_view_switch"
android:summary="@string/pref_summary_classic_notification"
android:title="@string/pref_title_classic_notification"
app:enableCopying="true"
@ -12,6 +13,7 @@
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="true"
android:key="colored_notification"
android:layout="@layout/list_item_view_switch"
android:summary="@string/pref_summary_colored_notification"
android:title="@string/pref_title_colored_notification"
app:enableCopying="true" />

View file

@ -4,6 +4,7 @@
<code.name.monkey.retromusic.preferences.NowPlayingScreenPreference
android:key="now_playing_screen_id"
android:layout="@layout/list_item_view"
android:title="@string/pref_title_now_playing_screen_appearance"
app:enableCopying="true"
app:icon="@drawable/ic_play_circle_filled_white_24dp" />
@ -11,8 +12,10 @@
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory
android:layout="@layout/preference_category_title"
android:title="@string/pref_header_album">
<code.name.monkey.retromusic.preferences.AlbumCoverStylePreference
android:key="album_cover_style_id"
android:layout="@layout/list_item_view"
android:title="@string/pref_title_album_cover_style"
app:enableCopying="true"
app:icon="@drawable/ic_image_white_24dp" />
@ -22,10 +25,12 @@
android:entries="@array/pref_album_cover_transform_entities"
android:entryValues="@array/pref_album_cover_transform_values"
android:key="album_cover_transform"
android:layout="@layout/list_item_view"
android:title="@string/pref_title_album_cover_transform"
app:enableCopying="true" />
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:layout="@layout/list_item_view_switch"
app:defaultValue="false"
app:enableCopying="true"
app:icon="@drawable/ic_view_carousel_black_24dp"
@ -37,7 +42,9 @@
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory
android:layout="@layout/preference_category_title"
android:title="@string/pref_header_controls">
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:layout="@layout/list_item_view_switch"
app:defaultValue="false"
app:enableCopying="true"
app:icon="@drawable/ic_play_arrow_white_32dp"
@ -47,6 +54,7 @@
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:layout="@layout/list_item_view"
app:defaultValue="false"
app:enableCopying="true"
app:icon="@drawable/ic_volume_up_white_24dp"

View file

@ -10,6 +10,7 @@
android:entries="@array/pref_playlists_last_added_interval_titles"
android:entryValues="@array/pref_playlists_last_added_interval_values"
android:key="last_added_interval"
android:layout="@layout/list_item_view"
android:negativeButtonText="@null"
android:positiveButtonText="@null"
android:title="@string/pref_title_last_added_interval"

View file

@ -10,6 +10,7 @@
android:entries="@array/pref_grid_style_list_titles"
android:entryValues="@array/pref_grid_style_list_values"
android:key="album_grid_style"
android:layout="@layout/list_item_view"
android:negativeButtonText="@null"
android:positiveButtonText="@null"
android:title="@string/pref_title_album_grid_style"
@ -21,6 +22,7 @@
android:entries="@array/pref_grid_style_list_titles"
android:entryValues="@array/pref_grid_style_list_values"
android:key="artist_grid_style"
android:layout="@layout/list_item_view"
android:negativeButtonText="@null"
android:positiveButtonText="@null"
android:title="@string/pref_title_artist_grid_style"
@ -33,6 +35,7 @@
android:entries="@array/pref_home_grid_style_list_titles"
android:entryValues="@array/pref_home_grid_style_list_values"
android:key="home_artist_grid_style"
android:layout="@layout/list_item_view"
android:negativeButtonText="@null"
android:positiveButtonText="@null"
android:title="@string/pref_title_home_artist_grid_style"
@ -42,6 +45,7 @@
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="false"
android:key="toggle_home_banner"
android:layout="@layout/list_item_view_switch"
android:summary="@string/pref_summary_home_banner"
android:title="@string/pref_title_home_banner" />
@ -51,6 +55,7 @@
<code.name.monkey.retromusic.preferences.LibraryPreference
android:key="library_categories"
android:layout="@layout/list_item_view"
android:summary="@string/pref_summary_library_categories"
android:title="@string/library_categories"
app:enableCopying="true"
@ -61,6 +66,7 @@
android:entries="@array/pref_tab_text_mode_titles"
android:entryValues="@array/pref_tab_text_mode_values"
android:key="tab_text_mode"
android:layout="@layout/list_item_view"
android:negativeButtonText="@null"
android:positiveButtonText="@null"
android:title="@string/pref_title_tab_text_mode"

View file

@ -8,6 +8,7 @@
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="false"
android:key="corner_window"
android:layout="@layout/list_item_view_switch"
android:summary="@string/pref_summary_round_corners"
android:title="@string/pref_title_round_corners"
app:enableCopying="true"
@ -16,6 +17,7 @@
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
android:defaultValue="false"
android:key="toggle_full_screen"
android:layout="@layout/list_item_view_switch"
android:summary="@string/pref_summary_toggle_full_screen"
android:title="@string/pref_title_toggle_full_screen"
app:icon="@drawable/ic_cellphone_white_24dp" />

View file

@ -17,7 +17,6 @@ package code.name.monkey.appthemehelper.common.prefs.supportv7
import android.content.Context
import android.util.AttributeSet
import androidx.preference.DialogPreference
import code.name.monkey.appthemehelper.R
open class ATEDialogPreference @JvmOverloads constructor(
context: Context,
@ -26,6 +25,6 @@ open class ATEDialogPreference @JvmOverloads constructor(
) : DialogPreference(context, attrs, defStyleAttr, defStyleRes) {
init {
layoutResource = R.layout.ate_preference_custom_support
}
}

View file

@ -18,7 +18,6 @@ import android.content.Context
import android.graphics.PorterDuff
import android.util.AttributeSet
import androidx.preference.Preference
import code.name.monkey.appthemehelper.R
import code.name.monkey.appthemehelper.ThemeStore
class ATEPreference @JvmOverloads constructor(
@ -29,7 +28,7 @@ class ATEPreference @JvmOverloads constructor(
) : Preference(context, attrs, defStyleAttr, defStyleRes) {
init {
layoutResource = R.layout.ate_preference_custom_support
icon?.setColorFilter(ThemeStore.textColorSecondary(context), PorterDuff.Mode.SRC_IN)
}
}