You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

三星S21设备上Android BottomSheet无法完全隐藏的问题求助

BottomSheet无法完全隐藏(仅三星S21设备出现该问题)

各位好,我最近碰到一个挺棘手的问题:我的BottomSheet没法完全隐藏,但这个情况只在三星S21设备上出现,其他测试过的机型都正常工作。我已经设置了隐藏状态和允许隐藏的属性,但还是没解决问题,想问问有没有人遇到过类似情况或者能给点解决思路?

相关代码

逻辑代码:

quickMenuSheetBehavior = BottomSheetBehavior.from(bottomSheetLayout);
quickMenuSheetBehavior.setState(BottomSheetBehavior.STATE_HIDDEN); //default set state
quickMenuSheetBehavior.setHideable(true);

布局文件代码:

<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <FrameLayout
        android:id="@+id/fl_bottom_sheet_container"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:paddingEnd="@dimen/bottom_sheet_bottom_sheet_container_frame_layout_padding_end"
        android:paddingStart="@dimen/bottom_sheet_bottom_sheet_container_frame_layout_padding_start"
        app:behavior_hideable="true"
        app:behavior_peekHeight="0dp"
        app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior" />

</androidx.coordinatorlayout.widget.CoordinatorLayout>

补充说明

问题截图已附上,麻烦大家帮忙看看,感谢!


内容的提问来源于stack exchange,提问作者mrzay

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.30 06:42:28