Settings icons rolled back,preference category title style, tabs options fix

This commit is contained in:
h4h13 2019-07-31 12:56:28 +05:30
parent 640ac4d4c3
commit da640ceff8
18 changed files with 26 additions and 29 deletions

View file

@ -13,8 +13,8 @@ android {
vectorDrawables.useSupportLibrary = true vectorDrawables.useSupportLibrary = true
applicationId "code.name.monkey.retromusic" applicationId "code.name.monkey.retromusic"
versionCode 344 versionCode 345
versionName '3.2.203' versionName '3.2.220'
multiDexEnabled true multiDexEnabled true

File diff suppressed because one or more lines are too long

View file

@ -41,10 +41,10 @@ class SettingsActivity : AbsBaseActivity(), SharedPreferences.OnSharedPreference
setSupportActionBar(toolbar) setSupportActionBar(toolbar)
setTitle(R.string.action_settings) setTitle(R.string.action_settings)
toolbar.apply { toolbar.apply {
setTitleTextColor( ThemeStore.accentColor(context)) setTitleTextColor( ThemeStore.textColorPrimary(context))
setBackgroundColor(ThemeStore.primaryColor(context)) setBackgroundColor(ThemeStore.primaryColor(context))
setNavigationOnClickListener { onBackPressed() } setNavigationOnClickListener { onBackPressed() }
ToolbarContentTintHelper.colorBackButton(toolbar, ThemeStore.accentColor(context)) ToolbarContentTintHelper.colorBackButton(toolbar, ThemeStore.textColorSecondary(context))
} }
appBarLayout.setBackgroundColor(ThemeStore.primaryColor(this)) appBarLayout.setBackgroundColor(ThemeStore.primaryColor(this))

View file

@ -123,7 +123,7 @@ public class CategoryInfoAdapter extends RecyclerView.Adapter<CategoryInfoAdapte
ViewHolder(View view) { ViewHolder(View view) {
super(view); super(view);
checkBox = view.findViewById(R.id.checkbox); checkBox = view.findViewById(R.id.checkbox);
checkBox.setBackgroundTintList(ColorStateList.valueOf(ThemeStore.Companion.accentColor(checkBox.getContext()))); checkBox.setButtonTintList(ColorStateList.valueOf(ThemeStore.Companion.accentColor(checkBox.getContext())));
title = view.findViewById(R.id.title); title = view.findViewById(R.id.title);
dragView = view.findViewById(R.id.drag_view); dragView = view.findViewById(R.id.drag_view);
} }

View file

@ -55,7 +55,7 @@ class AlbumCoverStylePreference : ATEDialogPreference {
} }
init { init {
icon?.setColorFilter(ThemeStore.accentColor(context), PorterDuff.Mode.SRC_IN) icon?.setColorFilter(ThemeStore.textColorSecondary(context), PorterDuff.Mode.SRC_IN)
} }
} }

View file

@ -42,7 +42,7 @@ class BlacklistPreference : ATEDialogPreference {
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes) constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes)
init { init {
icon?.setColorFilter(ThemeStore.accentColor(context), PorterDuff.Mode.SRC_IN) icon?.setColorFilter(ThemeStore.textColorSecondary(context), PorterDuff.Mode.SRC_IN)
} }
} }

View file

@ -44,7 +44,7 @@ class LibraryPreference : ATEDialogPreference {
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes) constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes)
init { init {
icon?.setColorFilter(ThemeStore.accentColor(context), PorterDuff.Mode.SRC_IN) icon?.setColorFilter(ThemeStore.textColorSecondary(context), PorterDuff.Mode.SRC_IN)
} }
} }

View file

@ -37,7 +37,7 @@ class MaterialListPreference : ListPreference {
} }
private fun init(context: Context) { private fun init(context: Context) {
icon?.setColorFilter(ThemeStore.accentColor(context), PorterDuff.Mode.SRC_IN) icon?.setColorFilter(ThemeStore.textColorSecondary(context), PorterDuff.Mode.SRC_IN)
} }
constructor(context: Context, attrs: AttributeSet) : super(context, attrs) { constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {

View file

@ -57,7 +57,7 @@ class NowPlayingScreenPreference : ATEDialogPreference {
} }
init { init {
icon?.setColorFilter(ThemeStore.accentColor(context), PorterDuff.Mode.SRC_IN) icon?.setColorFilter(ThemeStore.textColorSecondary(context), PorterDuff.Mode.SRC_IN)
} }
} }

View file

@ -384,6 +384,7 @@ public class MusicService extends Service implements SharedPreferences.OnSharedP
@Override @Override
public void onSeekTo(long pos) { public void onSeekTo(long pos) {
seek((int) pos); seek((int) pos);
updateMediaSessionPlaybackState();
} }
@Override @Override
@ -698,7 +699,7 @@ public class MusicService extends Service implements SharedPreferences.OnSharedP
new PlaybackStateCompat.Builder() new PlaybackStateCompat.Builder()
.setActions(MEDIA_SESSION_ACTIONS) .setActions(MEDIA_SESSION_ACTIONS)
.setState(isPlaying() ? PlaybackStateCompat.STATE_PLAYING : PlaybackStateCompat.STATE_PAUSED, .setState(isPlaying() ? PlaybackStateCompat.STATE_PLAYING : PlaybackStateCompat.STATE_PAUSED,
getPosition(), 1) getSongProgressMillis(), 1)
.build()); .build());
} }

View file

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.coordinatorlayout.widget.CoordinatorLayout 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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
@ -23,7 +24,8 @@
android:id="@+id/toolbar" android:id="@+id/toolbar"
style="@style/Toolbar" style="@style/Toolbar"
app:layout_collapseMode="pin" app:layout_collapseMode="pin"
app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp" /> app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp"
tools:title="@string/app_name" />
</com.google.android.material.appbar.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>

View file

@ -41,9 +41,8 @@
<style name="ToolbarTextAppearance"> <style name="ToolbarTextAppearance">
<item name="android:textSize">16sp</item> <item name="android:textAppearance">@style/TextAppearance.MaterialComponents.Headline6
<item name="android:textStyle">normal</item> </item>
<item name="android:fontFamily">@font/circular</item>
</style> </style>
<style name="ToolbarSubTitleTextAppearance"> <style name="ToolbarSubTitleTextAppearance">
@ -51,13 +50,7 @@
</style> </style>
<style name="BigTitleTextAppearance"> <style name="BigTitleTextAppearance">
<item name="android:textAppearance">@style/TextAppearance.MaterialComponents.Headline6
</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textStyle">bold</item> <item name="android:textStyle">bold</item>
<item name="android:layout_gravity">center</item>
<item name="android:gravity">center</item>
</style> </style>
<style name="BigTitleTextAppearanceToolbar"> <style name="BigTitleTextAppearanceToolbar">

View file

@ -39,7 +39,7 @@ class ATEColorPreference @JvmOverloads constructor(
widgetLayoutResource = R.layout.ate_preference_color widgetLayoutResource = R.layout.ate_preference_color
isPersistent = false isPersistent = false
icon?.setColorFilter(ThemeStore.accentColor(context), PorterDuff.Mode.SRC_IN) icon?.setColorFilter(ThemeStore.textColorSecondary(context), PorterDuff.Mode.SRC_IN)
} }
override fun onBindViewHolder(holder: PreferenceViewHolder) { override fun onBindViewHolder(holder: PreferenceViewHolder) {

View file

@ -30,7 +30,7 @@ class ATEListPreference @JvmOverloads constructor(
) : ListPreference(context, attrs, defStyleAttr, defStyleRes) { ) : ListPreference(context, attrs, defStyleAttr, defStyleRes) {
init { init {
icon?.setColorFilter(ThemeStore.accentColor(context), PorterDuff.Mode.SRC_IN) icon?.setColorFilter(ThemeStore.textColorSecondary(context), PorterDuff.Mode.SRC_IN)
layoutResource = R.layout.ate_preference_custom_support layoutResource = R.layout.ate_preference_custom_support
if (summary == null || summary.toString().trim { it <= ' ' }.isEmpty()) if (summary == null || summary.toString().trim { it <= ' ' }.isEmpty())
summary = "%s" summary = "%s"

View file

@ -30,6 +30,6 @@ class ATEPreference @JvmOverloads constructor(
init { init {
layoutResource = R.layout.ate_preference_custom_support layoutResource = R.layout.ate_preference_custom_support
icon?.setColorFilter(ThemeStore.accentColor(context), PorterDuff.Mode.SRC_IN) icon?.setColorFilter(ThemeStore.textColorSecondary(context), PorterDuff.Mode.SRC_IN)
} }
} }

View file

@ -28,7 +28,7 @@ class ATESeekBarPreference : SeekBarPreference {
} }
private fun init() { private fun init() {
icon?.setColorFilter(ThemeStore.accentColor(context), PorterDuff.Mode.SRC_IN) icon?.setColorFilter(ThemeStore.textColorSecondary(context), PorterDuff.Mode.SRC_IN)
} }
override fun onBindViewHolder(view: PreferenceViewHolder) { override fun onBindViewHolder(view: PreferenceViewHolder) {

View file

@ -33,6 +33,6 @@ class ATESwitchPreference : CheckBoxPreference {
private fun init() { private fun init() {
widgetLayoutResource = R.layout.ate_preference_switch_support widgetLayoutResource = R.layout.ate_preference_switch_support
icon?.setColorFilter(ThemeStore.accentColor(context), PorterDuff.Mode.SRC_IN) icon?.setColorFilter(ThemeStore.textColorSecondary(context), PorterDuff.Mode.SRC_IN)
} }
} }

View file

@ -8,6 +8,7 @@
android:paddingStart="72dp" android:paddingStart="72dp"
android:paddingLeft="16dp" android:paddingLeft="16dp"
android:paddingTop="16dp" android:paddingTop="16dp"
android:textAppearance="@style/TextAppearance.MaterialComponents.Body2" android:textAppearance="@style/TextAppearance.MaterialComponents.Overline"
android:textColor="?android:textColorSecondary" android:textColor="?android:textColorSecondary"
tools:ignore="RtlSymmetry" /> tools:ignore="RtlSymmetry"
tools:text="@string/app_name" />