How to set maximum expanded height in android support design bottom sheet?

前端 未结 4 1685
臣服心动
臣服心动 2020-12-24 06:46

I already showed my bottom sheet layout with its peek height set to 100dp. But how can I limit my bottom sheet to expand to 500dp only? This is my sample layout:

<         


        
4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-24 07:11

    You can just set param "maxHeight" to the root viewgroup of your bottom sheet.

    android:maxHeight=500dp

    Works good with ConstraintLayout as root layout.

提交回复
热议问题