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.
You can override onBackPressed() in tab activity ,
For more details or problem you might encounter , check this post,
Key Events in TabActivities?
精彩评论