Android BottomSheet: Is hiding under the toolbar

前端 未结 2 1030
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-30 03:12

I tried to use the new bottom sheet from the support library 23.2.0 to have a bottom sheet expand to full screen like suggested in the design guidelines

This works v

2条回答
  •  粉色の甜心
    2020-12-30 03:21

    The AppBarLayout has a default elevation of 4dp (the dimension resource value design_appbar_elevation).

    By default CoordinatorLayout, like any FrameLayout, will layout elements with higher elevation before lower elevation on API 21 and higher devices.

    Try adding android:elevation="@dimen/design_appbar_elevation" to your layout.

    Note that the elevation of a modal bottom sheet is @dimen/design_bottom_sheet_modal_elevation == 16dp

提交回复
热议问题