mirror of
https://github.com/cmclark00/RetroMusicPlayer.git
synced 2025-05-19 16:45:20 +01:00
Colored settings
This commit is contained in:
parent
01a4119a8d
commit
a5a27e62aa
9 changed files with 114 additions and 51 deletions
|
@ -154,7 +154,7 @@ abstract class AbsSlidingMusicPanelActivity protected constructor() : AbsMusicSe
|
|||
}
|
||||
|
||||
override fun onPanelSlide(panel: View?, slideOffset: Float) {
|
||||
bottomNavigationView.translationY = slideOffset * 400
|
||||
|
||||
setMiniPlayerAlphaProgress(slideOffset)
|
||||
}
|
||||
|
||||
|
@ -197,6 +197,9 @@ abstract class AbsSlidingMusicPanelActivity protected constructor() : AbsMusicSe
|
|||
miniPlayerFragment!!.view!!.alpha = alpha
|
||||
// necessary to make the views below clickable
|
||||
miniPlayerFragment!!.view!!.visibility = if (alpha == 0f) View.GONE else View.VISIBLE
|
||||
|
||||
bottomNavigationView.translationY = progress * 500
|
||||
bottomNavigationView.alpha = alpha
|
||||
}
|
||||
|
||||
private fun chooseFragmentForTheme() {
|
||||
|
|
|
@ -8,7 +8,6 @@ import android.view.View
|
|||
import android.view.ViewGroup
|
||||
import android.view.animation.LinearInterpolator
|
||||
import android.widget.SeekBar
|
||||
import code.name.monkey.appthemehelper.ThemeStore
|
||||
import code.name.monkey.appthemehelper.util.ATHUtil
|
||||
import code.name.monkey.appthemehelper.util.ColorUtil
|
||||
import code.name.monkey.appthemehelper.util.MaterialValueHelper
|
||||
|
@ -105,16 +104,12 @@ class MaterialControlsFragment : AbsPlayerControlsFragment() {
|
|||
updateShuffleState()
|
||||
|
||||
|
||||
val colorFinal = if (PreferenceUtil.getInstance().adaptiveColor) {
|
||||
color
|
||||
} else {
|
||||
ThemeStore.accentColor(context!!)
|
||||
if (PreferenceUtil.getInstance().adaptiveColor) {
|
||||
lastPlaybackControlsColor = color
|
||||
text.setTextColor(color)
|
||||
TintHelper.setTintAuto(progressSlider, color, false)
|
||||
}
|
||||
|
||||
lastPlaybackControlsColor = colorFinal
|
||||
text.setTextColor(colorFinal)
|
||||
TintHelper.setTintAuto(progressSlider, colorFinal, false)
|
||||
|
||||
updatePlayPauseColor()
|
||||
updatePrevNextColor()
|
||||
}
|
||||
|
|
|
@ -46,9 +46,7 @@ class MainSettingsFragment : Fragment(), View.OnClickListener {
|
|||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
settingsIcons.forEach {
|
||||
view.findViewById<ImageView>(it).setColorFilter(ThemeStore.accentColor(context!!))
|
||||
}
|
||||
|
||||
generalSettings.setOnClickListener(this)
|
||||
audioSettings.setOnClickListener(this)
|
||||
nowPlayingSettings.setOnClickListener(this)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue