Skip to content

Instantly share code, notes, and snippets.

@yahyaahrika
Created June 29, 2016 23:41
Show Gist options
  • Save yahyaahrika/ac7d26399185f6f64a83e6316d7bb720 to your computer and use it in GitHub Desktop.
Save yahyaahrika/ac7d26399185f6f64a83e6316d7bb720 to your computer and use it in GitHub Desktop.
button back to home desgin pattern
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setHomeButtonEnabled(true);
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
if (id == android.R.id.home) {
verifite();
}
return super.onOptionsItemSelected(item);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment