RAAAAM
RAAAAM

Reputation: 3380

Android TabActivity Back key Event

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.

Upvotes: 0

Views: 4383

Answers (1)

sat
sat

Reputation: 41076

You can override onBackPressed() in tab activity ,

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

Key Events in TabActivities?

Upvotes: 1

Related Questions