Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save franciscofranco/5f41e0422c0331c395d49a048cd699aa to your computer and use it in GitHub Desktop.
Save franciscofranco/5f41e0422c0331c395d49a048cd699aa to your computer and use it in GitHub Desktop.
@Override
public void onBackPressed() {
if (bottomSheetBehavior.getState() == BottomSheetBehavior.STATE_EXPANDED) {
bottomSheetBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);
return;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment