diff --git a/app/src/main/java/code/name/monkey/retromusic/fragments/player/classic/ClassicPlayerFragment.kt b/app/src/main/java/code/name/monkey/retromusic/fragments/player/classic/ClassicPlayerFragment.kt
index 8698744c..a4b9b406 100644
--- a/app/src/main/java/code/name/monkey/retromusic/fragments/player/classic/ClassicPlayerFragment.kt
+++ b/app/src/main/java/code/name/monkey/retromusic/fragments/player/classic/ClassicPlayerFragment.kt
@@ -12,14 +12,15 @@ import androidx.appcompat.widget.Toolbar
import androidx.core.view.ViewCompat
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
-import code.name.monkey.appthemehelper.ThemeStore
-import code.name.monkey.appthemehelper.util.*
+import code.name.monkey.appthemehelper.util.ATHUtil
+import code.name.monkey.appthemehelper.util.ColorUtil
+import code.name.monkey.appthemehelper.util.TintHelper
+import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.RetroBottomSheetBehavior
import code.name.monkey.retromusic.activities.base.AbsSlidingMusicPanelActivity
import code.name.monkey.retromusic.adapter.song.PlayingQueueAdapter
import code.name.monkey.retromusic.extensions.hide
-import code.name.monkey.retromusic.extensions.ripAlpha
import code.name.monkey.retromusic.extensions.show
import code.name.monkey.retromusic.fragments.VolumeFragment
import code.name.monkey.retromusic.fragments.base.AbsPlayerFragment
@@ -136,8 +137,7 @@ class ClassicPlayerFragment : AbsPlayerFragment(), View.OnLayoutChangeListener,
0
).build()
)
- shapeDrawable.fillColor =
- ColorStateList.valueOf(ATHUtil.resolveColor(requireContext(), R.attr.colorSurface))
+ shapeDrawable.fillColor = ColorStateList.valueOf(ATHUtil.resolveColor(requireContext(), R.attr.colorSurface))
playerQueueSheet.background = shapeDrawable
ToolbarContentTintHelper.colorizeToolbar(
@@ -263,45 +263,32 @@ class ClassicPlayerFragment : AbsPlayerFragment(), View.OnLayoutChangeListener,
override fun onColorChanged(color: MediaNotificationProcessor) {
lastColor = color.backgroundColor
- if (ATHUtil.isWindowBackgroundDark(requireContext())) {
- lastPlaybackControlsColor =
- MaterialValueHelper.getPrimaryTextColor(requireContext(), false)
- lastDisabledPlaybackControlsColor =
- MaterialValueHelper.getPrimaryDisabledTextColor(requireContext(), false)
- } else {
- lastPlaybackControlsColor =
- MaterialValueHelper.getSecondaryTextColor(requireContext(), true)
- lastDisabledPlaybackControlsColor =
- MaterialValueHelper.getSecondaryDisabledTextColor(requireContext(), true)
- }
+ lastPlaybackControlsColor = color.primaryTextColor
+ lastDisabledPlaybackControlsColor = ColorUtil.withAlpha(color.primaryTextColor, 0.3f)
+
+ title.setTextColor(color.primaryTextColor)
+ text.setTextColor(color.secondaryTextColor)
+ songInfo.setTextColor(color.secondaryTextColor)
- val colorFinal = if (PreferenceUtil.getInstance(requireContext()).adaptiveColor) {
- color.primaryTextColor
- } else {
- ThemeStore.accentColor(requireContext())
- }.ripAlpha()
+ songCurrentProgress.setTextColor(lastPlaybackControlsColor)
+ songTotalTime.setTextColor(lastPlaybackControlsColor)
- TintHelper.setTintAuto(
- playPauseButton,
- MaterialValueHelper.getPrimaryTextColor(
- requireContext(),
- ColorUtil.isColorLight(colorFinal)
- ),
- false
- )
- TintHelper.setTintAuto(playPauseButton, colorFinal, true)
+ ViewUtil.setProgressDrawable(progressSlider, color.primaryTextColor, true)
+ volumeFragment?.setTintableColor(color.primaryTextColor)
- ViewUtil.setProgressDrawable(progressSlider, colorFinal, true)
- volumeFragment?.setTintable(colorFinal)
+ player_queue_sub_header.setTextColor(color.secondaryTextColor)
+
+ TintHelper.setTintAuto(playPauseButton, color.primaryTextColor, true)
+ TintHelper.setTintAuto(playPauseButton, color.backgroundColor, false)
+ updateRepeatState()
+ updateShuffleState()
+ updatePrevNextColor()
ToolbarContentTintHelper.colorizeToolbar(
playerToolbar,
Color.WHITE,
requireActivity()
)
- updateRepeatState()
- updateShuffleState()
- updatePrevNextColor()
}
override fun toggleFavorite(song: Song) {
@@ -349,7 +336,7 @@ class ClassicPlayerFragment : AbsPlayerFragment(), View.OnLayoutChangeListener,
}
val height = playerContainer.height
val width = playerContainer.width
- val finalHeight = height - (playerControlsContainer.height + width)
+ val finalHeight = height - width
val panel = getQueuePanel()
panel.peekHeight = finalHeight
}
diff --git a/app/src/main/java/code/name/monkey/retromusic/fragments/player/fit/FitPlaybackControlsFragment.kt b/app/src/main/java/code/name/monkey/retromusic/fragments/player/fit/FitPlaybackControlsFragment.kt
index ab7bafd6..ab625478 100644
--- a/app/src/main/java/code/name/monkey/retromusic/fragments/player/fit/FitPlaybackControlsFragment.kt
+++ b/app/src/main/java/code/name/monkey/retromusic/fragments/player/fit/FitPlaybackControlsFragment.kt
@@ -238,19 +238,7 @@ class FitPlaybackControlsFragment : AbsPlayerControlsFragment() {
}
}
- override fun setUpProgressSlider() {
- progressSlider.setOnSeekBarChangeListener(object : SimpleOnSeekbarChangeListener() {
- override fun onProgressChanged(seekBar: SeekBar, progress: Int, fromUser: Boolean) {
- if (fromUser) {
- MusicPlayerRemote.seekTo(progress)
- onUpdateProgressViews(
- MusicPlayerRemote.songProgressMillis,
- MusicPlayerRemote.songDurationMillis
- )
- }
- }
- })
- }
+
private fun showBonceAnimation() {
playPauseButton.apply {
@@ -274,7 +262,19 @@ class FitPlaybackControlsFragment : AbsPlayerControlsFragment() {
}.start()
}
}
-
+ override fun setUpProgressSlider() {
+ progressSlider.setOnSeekBarChangeListener(object : SimpleOnSeekbarChangeListener() {
+ override fun onProgressChanged(seekBar: SeekBar, progress: Int, fromUser: Boolean) {
+ if (fromUser) {
+ MusicPlayerRemote.seekTo(progress)
+ onUpdateProgressViews(
+ MusicPlayerRemote.songProgressMillis,
+ MusicPlayerRemote.songDurationMillis
+ )
+ }
+ }
+ })
+ }
override fun onUpdateProgressViews(progress: Int, total: Int) {
progressSlider.max = total
diff --git a/app/src/main/res/layout/fragment_classic_controls.xml b/app/src/main/res/layout/fragment_classic_controls.xml
index 5af3ac25..574ecfd4 100644
--- a/app/src/main/res/layout/fragment_classic_controls.xml
+++ b/app/src/main/res/layout/fragment_classic_controls.xml
@@ -7,6 +7,7 @@
android:layout_height="match_parent"
android:gravity="center_vertical"
android:orientation="vertical"
+ android:paddingBottom="8dp"
tools:ignore="MissingPrefix">
diff --git a/app/src/main/res/layout/fragment_classic_player.xml b/app/src/main/res/layout/fragment_classic_player.xml
index 09d2ddea..6c385756 100644
--- a/app/src/main/res/layout/fragment_classic_player.xml
+++ b/app/src/main/res/layout/fragment_classic_player.xml
@@ -3,7 +3,8 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
- android:layout_height="match_parent">
+ android:layout_height="match_parent"
+ android:background="?attr/colorSurface">
+
+
+
+
+
+
+ app:cardElevation="24dp"
+ app:layout_behavior="code.name.monkey.retromusic.RetroBottomSheetBehavior">
-
+ android:layout_height="?attr/listPreferredItemHeightSmall"
+ android:gravity="center_vertical"
+ android:paddingLeft="16dp"
+ android:paddingRight="16dp"
+ android:text="@string/up_next"
+ android:textAppearance="@style/TextAppearance.AppCompat.Body2"
+ android:textColor="?android:attr/textColorSecondary" />
-
-
-
-
-
-
+ android:overScrollMode="never"
+ tools:listitem="@layout/item_list" />
+
\ No newline at end of file
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 4b6d9fb4..780ee2c7 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -175,8 +175,8 @@