diff --git a/app/src/main/java/code/name/monkey/retromusic/activities/base/AbsSlidingMusicPanelActivity.kt b/app/src/main/java/code/name/monkey/retromusic/activities/base/AbsSlidingMusicPanelActivity.kt index 9d84107a..180429ab 100644 --- a/app/src/main/java/code/name/monkey/retromusic/activities/base/AbsSlidingMusicPanelActivity.kt +++ b/app/src/main/java/code/name/monkey/retromusic/activities/base/AbsSlidingMusicPanelActivity.kt @@ -14,7 +14,6 @@ */ package code.name.monkey.retromusic.activities.base -import android.content.res.ColorStateList import android.graphics.Color import android.os.Bundle import android.view.View @@ -27,7 +26,6 @@ import androidx.core.view.updateLayoutParams import androidx.core.view.updatePadding import androidx.fragment.app.Fragment import androidx.fragment.app.commit -import code.name.monkey.appthemehelper.util.ATHUtil import code.name.monkey.appthemehelper.util.ColorUtil import code.name.monkey.retromusic.R import code.name.monkey.retromusic.RetroBottomSheetBehavior @@ -174,6 +172,7 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity() { } private fun setMiniPlayerAlphaProgress(progress: Float) { + if (progress < 0) return val alpha = 1 - progress miniPlayerFragment?.view?.alpha = alpha miniPlayerFragment?.view?.visibility = if (alpha == 0f) View.GONE else View.VISIBLE @@ -288,7 +287,7 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity() { } private fun hideBottomBar(hide: Boolean) { - val heightOfBar = + val heightOfBar = RetroUtil.getNavigationBarHeight() + if (MusicPlayerRemote.isCasting) dip(R.dimen.cast_mini_player_height) else dip(R.dimen.mini_player_height) val heightOfBarWithTabs = RetroUtil.getNavigationBarHeight() + if (MusicPlayerRemote.isCasting) dip(R.dimen.mini_cast_player_height_expanded) else dip( diff --git a/app/src/main/java/code/name/monkey/retromusic/fragments/MiniPlayerFragment.kt b/app/src/main/java/code/name/monkey/retromusic/fragments/MiniPlayerFragment.kt index c37bc346..b1361630 100644 --- a/app/src/main/java/code/name/monkey/retromusic/fragments/MiniPlayerFragment.kt +++ b/app/src/main/java/code/name/monkey/retromusic/fragments/MiniPlayerFragment.kt @@ -32,8 +32,6 @@ import code.name.monkey.retromusic.extensions.show import code.name.monkey.retromusic.extensions.textColorPrimary import code.name.monkey.retromusic.extensions.textColorSecondary import code.name.monkey.retromusic.fragments.base.AbsMusicServiceFragment -import code.name.monkey.retromusic.glide.GlideApp -import code.name.monkey.retromusic.glide.RetroGlideExtension import code.name.monkey.retromusic.helper.MusicPlayerRemote import code.name.monkey.retromusic.helper.MusicProgressViewUpdateHelper import code.name.monkey.retromusic.helper.PlayPauseButtonOnClickHandler diff --git a/app/src/main/res/layout/sliding_music_panel_layout.xml b/app/src/main/res/layout/sliding_music_panel_layout.xml index d55f3437..0db8165f 100644 --- a/app/src/main/res/layout/sliding_music_panel_layout.xml +++ b/app/src/main/res/layout/sliding_music_panel_layout.xml @@ -30,6 +30,7 @@ android:layout_height="wrap_content" app:behavior_hideable="true" app:behavior_peekHeight="0dp" + app:gestureInsetBottomIgnored="true" app:layout_behavior="code.name.monkey.retromusic.RetroBottomSheetBehavior">