我像这样制作底页片段:
val bottomSheet = PictureBottomSheetFragment(fragment)
bottomSheet.isCancelable = true
bottomSheet.setListener(pictureListener)
bottomSheet.show(ac.supportFragmentManager, "PictureBottomSheetFragment")
但是当我触摸外面时,它不会消失。并关闭或isCancelable不起作用。
尝试一下
behavior.setState(BottomSheetBehavior.STATE_HIDDEN));