Skip to content

Instantly share code, notes, and snippets.

@ruan65
Created July 30, 2016 13:02
Show Gist options
  • Save ruan65/0ee0bbf1393045ffafb7d46085e0a929 to your computer and use it in GitHub Desktop.
Save ruan65/0ee0bbf1393045ffafb7d46085e0a929 to your computer and use it in GitHub Desktop.
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
Toast.makeText(getApplicationContext(),"Back button clicked", Toast.LENGTH_SHORT).show();
break;
}
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment