开发者

Disabling the back button with an alertbox?

I have an alert box for a log in and when ever the back button is pressed the alert box disappears. I've tried @Override public void onBackPressed() { 开发者_StackOverflow社区// do nothing. } but it still just stops the back on the activity not the alertbox. Is there something special i have to do to disable the back button on the alertbox?


I believe setCancelable() is intended for this...

http://developer.android.com/reference/android/app/AlertDialog.Builder.html#setCancelable(boolean)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜