Colored settings

This commit is contained in:
h4h13 2019-02-17 23:33:12 +05:30
parent 01a4119a8d
commit a5a27e62aa
9 changed files with 114 additions and 51 deletions

View file

@ -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() {

View file

@ -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()
}

View file

@ -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)