I have two Activities A and B . When i swithc between activity A to B the Activity b comes with 3d transition animation.when i press a back button in Activity B the Activity B exits with Animation.
Please Answer.
Hope Your Quick Response.
I have two Activities A and B . When i swithc between activity A to B the Activity b comes with 3d transition animation.when i press a back button in Activity B the Activity B exits with Animation.
Please Answer.
Hope Your Quick Response.
you can able to control your back button with the below method. just do the tasks what you need inside this method. the Default action for the back key is to finish()
teh current Activity. you can override with this method.
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) {
//do the needful here
}
}