开发者

Back button on Android Phones

开发者 https://www.devze.com 2023-01-06 10:24 出处:网络
A couple questions about the back button (as seen on the emulator)... Do all Android phones have the back button as a hard, tactile button?

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 animatio开发者_运维百科ns in my app.


  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.


For 3: Yes.

@Override 
public void onBackPressed() {
    super.onBackPressed();
    overridePendingTransition(R.anim.zoom_enter, R.anim.zoom_exit);
}
0

精彩评论

暂无评论...
验证码 换一张
取 消