From 70f9124fe5d65f066303ea5fc946396e4c91d8fc Mon Sep 17 00:00:00 2001 From: h4h13 Date: Sat, 27 Jul 2019 10:35:52 +0530 Subject: [PATCH] Fix seekbar color --- app/src/main/assets/retro-changelog.html | 2 +- .../activities/base/AbsThemeActivity.kt | 3 +- .../retromusic/fragments/VolumeFragment.kt | 4 +- .../mainactivity/LibraryFragment.java | 15 +- .../material/MaterialControlsFragment.kt | 5 +- .../main/res/drawable/color_progress_seek.xml | 49 ++++- .../main/res/layout-xlarge/fragment_blur.xml | 2 +- ...ment_adaptive_player_playback_controls.xml | 23 +-- .../fragment_blur_playback_controls.xml | 192 ------------------ ...ent_card_blur_player_playback_controls.xml | 5 +- ...fragment_card_player_playback_controls.xml | 2 +- ...gment_classic_player_playback_controls.xml | 2 +- ...ragment_color_player_playback_controls.xml | 7 +- .../layout/fragment_fit_playback_controls.xml | 2 +- ...fragment_flat_player_playback_controls.xml | 7 +- .../layout/fragment_full_player_controls.xml | 19 +- ...fragment_lock_screen_playback_controls.xml | 7 +- .../fragment_material_playback_controls.xml | 18 +- .../fragment_plain_controls_fragment.xml | 7 +- .../fragment_player_playback_controls.xml | 7 +- .../fragment_tiny_controls_fragment.xml | 4 +- app/src/main/res/layout/fragment_volume.xml | 1 + app/src/main/res/layout/media_button.xml | 11 +- app/src/main/res/layout/volume_controls.xml | 11 +- 24 files changed, 130 insertions(+), 275 deletions(-) delete mode 100644 app/src/main/res/layout/fragment_blur_playback_controls.xml diff --git a/app/src/main/assets/retro-changelog.html b/app/src/main/assets/retro-changelog.html index 8152c9ad..f1f50657 100644 --- a/app/src/main/assets/retro-changelog.html +++ b/app/src/main/assets/retro-changelog.html @@ -1 +1 @@ -

We're really sorry for Announcing this Retro Music is driving towards pure Android Material Design guidelines we don't want any unnecessary UI elements that don't need for Music player.

v3.2.125

v3.2.120

v3.2.105

v3.2.100

v3.2.000

v3.1.900

v3.1.850

v3.1.800

v3.1.700

v3.1.400

v3.1.300

v3.1.240

v3.1.200

v3.0.570

If you see entire app white or dark or black select same theme in settings to fix

FAQ's

*If you face any UI related issues you clear app data and cache, if its not working try to uninstall and install again.

\ No newline at end of file +

v3.2.125

v3.2.120

v3.2.105

v3.2.100

v3.2.000

v3.1.900

v3.1.850

v3.1.800

v3.1.700

v3.1.400

v3.1.300

v3.1.240

v3.1.200

v3.0.570

If you see entire app white or dark or black select same theme in settings to fix

FAQ's

*If you face any UI related issues you clear app data and cache, if its not working try to uninstall and install again.

\ No newline at end of file diff --git a/app/src/main/java/code/name/monkey/retromusic/activities/base/AbsThemeActivity.kt b/app/src/main/java/code/name/monkey/retromusic/activities/base/AbsThemeActivity.kt index 64e87c09..fde4d776 100644 --- a/app/src/main/java/code/name/monkey/retromusic/activities/base/AbsThemeActivity.kt +++ b/app/src/main/java/code/name/monkey/retromusic/activities/base/AbsThemeActivity.kt @@ -10,13 +10,14 @@ import android.view.WindowManager import androidx.annotation.ColorInt import androidx.core.content.ContextCompat import code.name.monkey.appthemehelper.ATH +import code.name.monkey.appthemehelper.ATHActivity import code.name.monkey.appthemehelper.ThemeStore import code.name.monkey.appthemehelper.util.* import code.name.monkey.retromusic.R import code.name.monkey.retromusic.util.PreferenceUtil import code.name.monkey.retromusic.util.RetroUtil -abstract class AbsThemeActivity : AbsCrashCollector(), Runnable { +abstract class AbsThemeActivity : ATHActivity(), Runnable { private val handler = Handler() diff --git a/app/src/main/java/code/name/monkey/retromusic/fragments/VolumeFragment.kt b/app/src/main/java/code/name/monkey/retromusic/fragments/VolumeFragment.kt index 0ccfb6fd..69674fae 100755 --- a/app/src/main/java/code/name/monkey/retromusic/fragments/VolumeFragment.kt +++ b/app/src/main/java/code/name/monkey/retromusic/fragments/VolumeFragment.kt @@ -127,8 +127,8 @@ class VolumeFragment : Fragment(), SeekBar.OnSeekBarChangeListener, OnAudioVolum fun setTintableColor(color: Int) { volumeDown.setColorFilter(color, PorterDuff.Mode.SRC_IN) volumeUp.setColorFilter(color, PorterDuff.Mode.SRC_IN) - TintHelper.setTint(volumeSeekBar, color, false) - //ViewUtil.setProgressDrawable(volumeSeekBar, color, true) + //TintHelper.setTint(volumeSeekBar, color, false) + ViewUtil.setProgressDrawable(volumeSeekBar, color, true) } companion object { diff --git a/app/src/main/java/code/name/monkey/retromusic/fragments/mainactivity/LibraryFragment.java b/app/src/main/java/code/name/monkey/retromusic/fragments/mainactivity/LibraryFragment.java index 326c7d47..511dad65 100644 --- a/app/src/main/java/code/name/monkey/retromusic/fragments/mainactivity/LibraryFragment.java +++ b/app/src/main/java/code/name/monkey/retromusic/fragments/mainactivity/LibraryFragment.java @@ -1,6 +1,7 @@ package code.name.monkey.retromusic.fragments.mainactivity; import android.app.Activity; +import android.content.SharedPreferences; import android.os.Bundle; import android.view.LayoutInflater; import android.view.Menu; @@ -40,11 +41,12 @@ import code.name.monkey.retromusic.helper.SortOrder; import code.name.monkey.retromusic.interfaces.CabHolder; import code.name.monkey.retromusic.interfaces.MainActivityFragmentCallbacks; import code.name.monkey.retromusic.util.NavigationUtil; +import code.name.monkey.retromusic.util.PreferenceUtil; import code.name.monkey.retromusic.util.RetroColorUtil; import code.name.monkey.retromusic.util.RetroUtil; import io.reactivex.disposables.CompositeDisposable; -public class LibraryFragment extends AbsMainActivityFragment implements CabHolder, MainActivityFragmentCallbacks { +public class LibraryFragment extends AbsMainActivityFragment implements CabHolder, MainActivityFragmentCallbacks, SharedPreferences.OnSharedPreferenceChangeListener { public static final String TAG = "LibraryFragment"; private static final String CURRENT_TAB_ID = "current_tab_id"; @@ -77,6 +79,7 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde public void onDestroyView() { super.onDestroyView(); disposable.dispose(); + PreferenceUtil.getInstance().unregisterOnSharedPreferenceChangedListener(this); } @Nullable @@ -89,7 +92,7 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde toolbarContainer = view.findViewById(R.id.toolbarContainer); appBarLayout = view.findViewById(R.id.appBarLayout); toolbar = view.findViewById(R.id.toolbar); - + PreferenceUtil.getInstance().registerOnSharedPreferenceChangedListener(this); return view; } @@ -464,4 +467,12 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde } + @Override + public void onSharedPreferenceChanged(@NonNull SharedPreferences sharedPreferences, + @NonNull String key) { + if (key.equals(PreferenceUtil.LIBRARY_CATEGORIES)){ + Fragment fragment= getCurrentFragment(); + + } + } } \ No newline at end of file diff --git a/app/src/main/java/code/name/monkey/retromusic/fragments/player/material/MaterialControlsFragment.kt b/app/src/main/java/code/name/monkey/retromusic/fragments/player/material/MaterialControlsFragment.kt index 14229973..63db40c1 100644 --- a/app/src/main/java/code/name/monkey/retromusic/fragments/player/material/MaterialControlsFragment.kt +++ b/app/src/main/java/code/name/monkey/retromusic/fragments/player/material/MaterialControlsFragment.kt @@ -108,9 +108,10 @@ class MaterialControlsFragment : AbsPlayerControlsFragment() { color } else { ThemeStore.textColorSecondary(context!!) - } + }.ripAlpha() + text.setTextColor(colorFinal) - ViewUtil.setProgressDrawable(progressSlider, colorFinal.ripAlpha(), true) + ViewUtil.setProgressDrawable(progressSlider, colorFinal, true) volumeFragment?.setTintable(colorFinal) diff --git a/app/src/main/res/drawable/color_progress_seek.xml b/app/src/main/res/drawable/color_progress_seek.xml index 5386ffb4..62c210b5 100755 --- a/app/src/main/res/drawable/color_progress_seek.xml +++ b/app/src/main/res/drawable/color_progress_seek.xml @@ -1,16 +1,59 @@ + + + - + + + + + + + + + + + - + - \ No newline at end of file + + + diff --git a/app/src/main/res/layout-xlarge/fragment_blur.xml b/app/src/main/res/layout-xlarge/fragment_blur.xml index 30c1da40..cd248814 100644 --- a/app/src/main/res/layout-xlarge/fragment_blur.xml +++ b/app/src/main/res/layout-xlarge/fragment_blur.xml @@ -68,7 +68,7 @@ android:name="code.name.monkey.retromusic.fragments.player.blur.BlurPlaybackControlsFragment" android:layout_width="match_parent" android:layout_height="match_parent" - tools:layout="@layout/fragment_blur_playback_controls" /> + tools:layout="@layout/fragment_player_playback_controls" /> - - - - - - - - - + diff --git a/app/src/main/res/layout/fragment_blur_playback_controls.xml b/app/src/main/res/layout/fragment_blur_playback_controls.xml deleted file mode 100644 index b32c4d30..00000000 --- a/app/src/main/res/layout/fragment_blur_playback_controls.xml +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/src/main/res/layout/fragment_card_blur_player_playback_controls.xml b/app/src/main/res/layout/fragment_card_blur_player_playback_controls.xml index 273bd432..fc97ba9b 100644 --- a/app/src/main/res/layout/fragment_card_blur_player_playback_controls.xml +++ b/app/src/main/res/layout/fragment_card_blur_player_playback_controls.xml @@ -20,7 +20,7 @@ android:layout_height="wrap_content" android:orientation="vertical"> - - - - - - diff --git a/app/src/main/res/layout/fragment_fit_playback_controls.xml b/app/src/main/res/layout/fragment_fit_playback_controls.xml index 48bf4873..9e6eb290 100644 --- a/app/src/main/res/layout/fragment_fit_playback_controls.xml +++ b/app/src/main/res/layout/fragment_fit_playback_controls.xml @@ -37,7 +37,7 @@ android:textSize="12sp" tools:ignore="RtlHardcoded,RtlSymmetry" /> - - - - - - - - - - - - - - - - diff --git a/app/src/main/res/layout/fragment_material_playback_controls.xml b/app/src/main/res/layout/fragment_material_playback_controls.xml index 5d92051b..eb65f8cc 100644 --- a/app/src/main/res/layout/fragment_material_playback_controls.xml +++ b/app/src/main/res/layout/fragment_material_playback_controls.xml @@ -15,7 +15,7 @@ android:paddingStart="12dp" android:paddingEnd="12dp"> - - - @@ -105,7 +106,7 @@ android:layout_weight="1" tools:ignore="ContentDescription,UnusedAttribute"> - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + android:paddingEnd="8dp" /> \ No newline at end of file