Created
June 29, 2016 23:41
-
-
Save yahyaahrika/ac7d26399185f6f64a83e6316d7bb720 to your computer and use it in GitHub Desktop.
button back to home desgin pattern
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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