Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Back button on Android Phones

Tags:

android

A couple questions about the back button (as seen on the emulator)...

  1. Do all Android phones have the back button as a hard, tactile button?

  2. If so, is it still recommended to put a back button in your software?

  3. Is it possible to change the animation between activities when this back button is pressed? I would like it to be consistent with the animations in my app.

like image 600
dfetter88 Avatar asked Jul 06 '10 22:07

dfetter88


2 Answers

  1. All Android phones have a dedicated BACK button. It is not always a "hard, tactile" button.

  2. It is never recommended to put a BACK button in your software.

  3. Reportedly, yes, but I do not have the answer handy, sorry.

like image 195
CommonsWare Avatar answered Oct 09 '22 13:10

CommonsWare


For 3: Yes.

@Override 
public void onBackPressed() {
    super.onBackPressed();
    overridePendingTransition(R.anim.zoom_enter, R.anim.zoom_exit);
}
like image 33
IlyaEremin Avatar answered Oct 09 '22 13:10

IlyaEremin