我在 RecyclerView 中有一個 BottomSheetDialogFragment,當單擊按鈕時,BottomSheet 正在顯示。BottomSheetDialog 在向下滾動時展開,在正常滾動到頂部時折疊。

但是當我將 RecyclerView 放在片段中并將片段放置到 BottomSheetDialog 時;BottomSheet 行為不適用于片段,僅適用于 RecyclerView 滾動。另一方面,這些行為在 BottomSheet 的其他地方起作用。如何啟用第一個行為?
uj5u.com熱心網友回復:
您應該檢查您的容器布局是否具有app:layout_behavior="@string/bottom_sheet_behavior">并檢查您定義的任何偵聽器/事件是否額外,否則 BottomSheetDialog 通常會按照您的預期運行。
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/434670.html
