Closed abbasalim closed 7 years ago
When you create the view, you will need to get reference to some view findVIewById(...)
and set up a click listener for that view that will close the bottomsheet.
EXAMPLE:
java
View view = ...;
final BottomSheet bottomSheet= BottomSheet.Builder(this)
.setView(view)
.setListener(this)
.build();
view.findViewById(R.id.button).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { bottomSheet.dismiss(); } });
bottomSheet.show();
i .setCancelable(false) and use custom view, how i can hide bottom sheet when click one item of my custom view?