Skip to content

Instantly share code, notes, and snippets.

@yahyaahrika
Created June 27, 2016 13:20
Show Gist options
  • Save yahyaahrika/d0945ec519b1050f1343d0ceae975daa to your computer and use it in GitHub Desktop.
Save yahyaahrika/d0945ec519b1050f1343d0ceae975daa to your computer and use it in GitHub Desktop.
butoon back keyup
@Override
public boolean onKeyUp(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) {
startActivity(new Intent(context, MainDialog.class));
finish();
return true;
}
return super.onKeyUp(keyCode, event);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment