0

I tried to go back when pressing back button in tabActivity. previously i did

 public boolean onKeyDown(int keyCode, KeyEvent event) {
        if (keyCode == KeyEvent.KEYCODE_BACK)
            showDialog(DIALOG_REALLY_EXIT_ID);

        return true;

    }
private void showlist() {
    // TODO Auto-generated method stub

}

But this event never called in TabActivity. i dont know how to get back from tabActivity, I am new to android, can anyone give me pls.

RAAAAM
  • 3,378
  • 19
  • 59
  • 108

1 Answers1

1

You can override onBackPressed() in tab activity ,

For more details or problem you might encounter , check this post,

Key Events in TabActivities?

Community
  • 1
  • 1
sat
  • 40,138
  • 28
  • 93
  • 102