开发者

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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜