You cannot call onCreate on back key pressed. However you can do one thing that finish your contact picker activity. Override the function onBackPressed in Child activity and start a new Activity there.
– Mark Hosang Jun 23 at 10:17 it will dump stack in ActivityManager. It will be better to finish off the activity so that it doesn't consume user's battery – Sarmad Jun 23 at 10:32.
Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent. KEYCODE_BACK) { moveTaskToBack(false);//this will not allow to go back //Here put your code i. E start new activity but first finish current activity return true; } return super.
OnKeyDown(keyCode, event); }.
Though I geuss I didn't mention what api I was using. Also what about the orignal calling parent activity? – Mark Hosang Jun 23 at 10:19.
How to reload a fragment when back button is pressed. I have handled the back button code, I am getting to the place where in the fragment needs to be reloaded, but I am failing in reloading the fragments. I need my changes to be visible on screen, so I should reload.
Any simple steps/?
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.