5

我制作这样的底部片断:

val bottomSheet = PictureBottomSheetFragment(fragment)
bottomSheet.isCancelable = true
bottomSheet.setListener(pictureListener)
bottomSheet.show(ac.supportFragmentManager, "PictureBottomSheetFragment")

但是当我触摸外面时它不会消失。并解雇或isCancelable不起作用。

4

1 回答 1

0

尝试这个

behavior.setState(BottomSheetBehavior.STATE_HIDDEN));
于 2020-01-11T09:53:57.693 回答