Fixed Window bottom insets when Expanded header(Collapsing toolbar) is enabled

This commit is contained in:
Prathamesh More 2022-04-13 20:15:26 +05:30
parent e0f345b616
commit 4a7c367ab5
7 changed files with 17 additions and 16 deletions

View file

@ -399,7 +399,10 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity() {
if (hide) {
bottomSheetBehavior.peekHeight = -windowInsets.safeGetBottomInsets()
bottomSheetBehavior.state = STATE_COLLAPSED
libraryViewModel.setFabMargin(this, if (isBottomNavVisible) dip(R.dimen.bottom_nav_height) else 0)
libraryViewModel.setFabMargin(
this,
if (isBottomNavVisible) dip(R.dimen.bottom_nav_height) else 0
)
} else {
if (MusicPlayerRemote.playingQueue.isNotEmpty()) {
binding.slidingPanel.elevation = 0F

View file

@ -5,6 +5,7 @@ import android.content.SharedPreferences.OnSharedPreferenceChangeListener
import android.net.ConnectivityManager
import androidx.core.content.edit
import androidx.core.content.getSystemService
import androidx.core.content.res.use
import androidx.preference.PreferenceManager
import androidx.viewpager.widget.ViewPager
import code.name.monkey.appthemehelper.util.VersionUtils

View file

@ -4,7 +4,6 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorSurface"
android:fitsSystemWindows="true"
android:orientation="vertical"
tools:ignore="UnusedAttribute">

View file

@ -6,14 +6,6 @@
android:layout_height="match_parent"
android:fitsSystemWindows="true">
<code.name.monkey.retromusic.views.TopAppBarLayout
android:id="@+id/appBarLayout"
style="?appBarLayoutStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fitsSystemWindows="true"
android:theme="@style/CenteredCheckBoxTheme" />
<code.name.monkey.retromusic.views.insets.InsetsRecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
@ -25,6 +17,14 @@
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"
tools:listitem="@layout/item_list" />
<code.name.monkey.retromusic.views.TopAppBarLayout
android:id="@+id/appBarLayout"
style="?appBarLayoutStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fitsSystemWindows="true"
android:theme="@style/CenteredCheckBoxTheme" />
<LinearLayout
android:id="@android:id/empty"
android:layout_width="wrap_content"

View file

@ -15,7 +15,6 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorSurface"
android:descendantFocusability="blocksDescendants"
android:focusable="true"
android:focusableInTouchMode="true"

View file

@ -8,13 +8,12 @@
<androidx.fragment.app.FragmentContainerView
android:id="@+id/fragment_container"
tools:layout="@layout/fragment_home"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?colorSurface"
app:defaultNavHost="true"
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior" />
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"
tools:layout="@layout/fragment_home" />
<FrameLayout
android:id="@+id/slidingPanel"
@ -23,8 +22,8 @@
android:layout_height="wrap_content"
app:behavior_hideable="true"
app:behavior_peekHeight="0dp"
app:gestureInsetBottomIgnored="true"
app:enableEdgeToEdge="true"
app:gestureInsetBottomIgnored="true"
app:layout_behavior="code.name.monkey.retromusic.RetroBottomSheetBehavior">
<FrameLayout

View file

@ -357,7 +357,7 @@
<string name="pref_title_album_cover_style">Album cover theme</string>
<string name="pref_title_album_cover_transform">Album cover skip</string>
<string name="pref_title_app_shortcuts">Colored app shortcuts</string>
<string name="pref_title_appbar_mode">App bar mode</string>
<string name="pref_title_appbar_mode">Header style</string>
<string name="pref_title_audio_ducking">Reduce volume on focus loss</string>
<string name="pref_title_audio_fade">Fade audio</string>
<string name="pref_title_auto_download_artist_images">Auto-download artist images</string>