diff --git a/app/src/main/java/org/oxycblt/auxio/playback/queue/QueueSheetBehavior.kt b/app/src/main/java/org/oxycblt/auxio/playback/queue/QueueSheetBehavior.kt index ff67e1d0c..9586ba7da 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/queue/QueueSheetBehavior.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/queue/QueueSheetBehavior.kt @@ -23,7 +23,6 @@ import android.view.View import android.view.WindowInsets import androidx.coordinatorlayout.widget.CoordinatorLayout import com.google.android.material.shape.MaterialShapeDrawable -import com.google.android.material.shape.ShapeAppearanceModel import org.oxycblt.auxio.R import org.oxycblt.auxio.ui.AuxioSheetBehavior import org.oxycblt.auxio.util.* @@ -57,13 +56,6 @@ class QueueSheetBehavior(context: Context, attributeSet: AttributeSet? MaterialShapeDrawable.createWithElevationOverlay(context).apply { fillColor = context.getAttrColorCompat(R.attr.colorSurface) elevation = context.getDimen(R.dimen.elevation_normal) - - val cornersMedium = context.getDimen(R.dimen.size_corners_medium) - shapeAppearanceModel = - ShapeAppearanceModel.Builder() - .setTopLeftCornerSize(cornersMedium) - .setTopRightCornerSize(cornersMedium) - .build() } override fun applyWindowInsets(child: View, insets: WindowInsets): WindowInsets { diff --git a/app/src/main/java/org/oxycblt/auxio/ui/BottomSheetContentBehavior.kt b/app/src/main/java/org/oxycblt/auxio/ui/BottomSheetContentBehavior.kt index bac1ae091..a531fa22c 100644 --- a/app/src/main/java/org/oxycblt/auxio/ui/BottomSheetContentBehavior.kt +++ b/app/src/main/java/org/oxycblt/auxio/ui/BottomSheetContentBehavior.kt @@ -31,6 +31,19 @@ import org.oxycblt.auxio.util.systemBarInsetsCompat /** * A behavior that automatically re-layouts and re-insets content to align with the parent layout's * bottom sheet. + * + * Ideally, we would one day want to switch to only re-insetting content, however this comes with + * several issues:: + * 1. Scroll position. I need to find a good way to save padding in order to prevent desync, as + * window insets tend to be applied after restoration. + * 2. Over scrolling. Glow scrolls will not cut it, as the bottom glow will be caught under the bar, + * and moving it above the insets will result in an incorrect glow position when the bar is not + * shown. I have to emulate stretch scrolling below Android 12 instead. However, this is also + * similarly distorted by the insets, and thus I must go further and modify the edge effect to be + * at least somewhat clamped to the insets themselves. + * 3. Touch events. Bottom sheets must always intercept touches in their bounds, or they will + * click the now overlapping content view that is only inset by it and not unhidden by it. + * * @author OxygenCobalt */ class BottomSheetContentBehavior(context: Context, attributeSet: AttributeSet?) :