Skip to content

Instantly share code, notes, and snippets.

@waseefakhtar
Created February 21, 2020 19:13
Show Gist options
  • Save waseefakhtar/fea3530d4957a7e6609060908a29244b to your computer and use it in GitHub Desktop.
Save waseefakhtar/fea3530d4957a7e6609060908a29244b to your computer and use it in GitHub Desktop.
override fun onBackPressed() {
if (drawer.isDrawerOpen(GravityCompat.START)) {
drawer.closeDrawer(GravityCompat.START)
} else {
super.onBackPressed()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment