Fixed Settings light status bar and mini player alpha
This commit is contained in:
parent
e11494f443
commit
7f683eb0ee
2 changed files with 3 additions and 1 deletions
|
@ -26,6 +26,7 @@ import code.name.monkey.retromusic.appshortcuts.DynamicShortcutManager
|
||||||
import code.name.monkey.retromusic.databinding.ActivitySettingsBinding
|
import code.name.monkey.retromusic.databinding.ActivitySettingsBinding
|
||||||
import code.name.monkey.retromusic.extensions.applyToolbar
|
import code.name.monkey.retromusic.extensions.applyToolbar
|
||||||
import code.name.monkey.retromusic.extensions.findNavController
|
import code.name.monkey.retromusic.extensions.findNavController
|
||||||
|
import code.name.monkey.retromusic.extensions.surfaceColor
|
||||||
import com.afollestad.materialdialogs.MaterialDialog
|
import com.afollestad.materialdialogs.MaterialDialog
|
||||||
import com.afollestad.materialdialogs.color.ColorCallback
|
import com.afollestad.materialdialogs.color.ColorCallback
|
||||||
|
|
||||||
|
@ -34,6 +35,7 @@ class SettingsActivity : AbsBaseActivity(), ColorCallback {
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
setDrawUnderStatusBar()
|
setDrawUnderStatusBar()
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
setLightStatusbarAuto(surfaceColor())
|
||||||
binding = ActivitySettingsBinding.inflate(layoutInflater)
|
binding = ActivitySettingsBinding.inflate(layoutInflater)
|
||||||
setContentView(binding.root)
|
setContentView(binding.root)
|
||||||
setupToolbar()
|
setupToolbar()
|
||||||
|
|
|
@ -174,7 +174,7 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity() {
|
||||||
private fun setMiniPlayerAlphaProgress(progress: Float) {
|
private fun setMiniPlayerAlphaProgress(progress: Float) {
|
||||||
if (progress < 0) return
|
if (progress < 0) return
|
||||||
val alpha = 1 - progress
|
val alpha = 1 - progress
|
||||||
miniPlayerFragment?.view?.alpha = alpha
|
miniPlayerFragment?.view?.alpha = 1 - (progress / 0.2F)
|
||||||
miniPlayerFragment?.view?.visibility = if (alpha == 0f) View.GONE else View.VISIBLE
|
miniPlayerFragment?.view?.visibility = if (alpha == 0f) View.GONE else View.VISIBLE
|
||||||
binding.bottomNavigationView.translationY = progress * 500
|
binding.bottomNavigationView.translationY = progress * 500
|
||||||
binding.bottomNavigationView.alpha = alpha
|
binding.bottomNavigationView.alpha = alpha
|
||||||
|
|
Loading…
Reference in a new issue