@Override
    public boolean onKeyDown(int keyCode, KeyEvent event) {
        if (keyCode == KeyEvent.KEYCODE_BACK) {
                //Intent intent = new Intent(this,name of the class where you
want to go to);

                startActivity(intent);

                return true;
        }
        return super.onKeyDown(keyCode, event);
    }

this code captures the event on back button click

On Mar 22, 8:49 am, Ranveer <ranveer.s...@gmail.com> wrote:
> Dear all,
>
> I want to reload the previous activity (history) on back button click.
> Right now When I am pressing back (Phone) it going to previous activity
> but showing from history.
> So every time I click back I want to reload the history page.
>
> regards

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to