diff --git a/app/src/main/java/org/oxycblt/auxio/playback/queue/QueueBottomSheetBehavior.kt b/app/src/main/java/org/oxycblt/auxio/playback/queue/QueueBottomSheetBehavior.kt index a1d4be359..92f50a5d9 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/queue/QueueBottomSheetBehavior.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/queue/QueueBottomSheetBehavior.kt @@ -23,6 +23,7 @@ import android.util.AttributeSet import android.view.View import android.view.WindowInsets import androidx.coordinatorlayout.widget.CoordinatorLayout +import androidx.core.view.updatePadding import com.google.android.material.R as MR import com.google.android.material.shape.MaterialShapeDrawable import com.google.android.material.shape.ShapeAppearanceModel @@ -106,6 +107,10 @@ class QueueBottomSheetBehavior(context: Context, attributeSet: Attribu val bars = insets.systemBarInsetsCompat val effectiveBarHeight = if (barHeight > 0) barHeight else getIdealBarHeight(child.context) expandedOffset = effectiveBarHeight + barSpacing + // The sheet is measured at full height from its expanded offset, so its bottom extends + // that far below the screen. Pad the content so it ends at the visible bottom instead + // (which also keeps the empty-queue hint visually centered). + child.updatePadding(bottom = expandedOffset + bars.bottom) return insets.replaceSystemBarInsetsCompat( bars.left, bars.top,