安卓弹出对话框,禁用返回键使其消失
时间:2014-10-23 22:17:22
收藏:0
阅读:347
AlertDialog.Builder的setCancelable
public AlertDialog.Builder setCancelable (boolean cancelable)
Since: API Level 1
Sets whether the dialog is cancelable or not default is true.
设置为false,按返回键不能退出。默认为true。
妈蛋,一直以为是返回键重写应该是return TRUE还是FALSE的问题,原来竟然是builder自身的属性,自己不去设置这个属性,默认是可以按返回键使其消失的!!!!!
原文:http://www.cnblogs.com/lucky-star-star/p/4046724.html
评论(0)