首页 > 移动平台 > 详细

安卓弹出对话框,禁用返回键使其消失

时间:2014-10-23 22:17:22      阅读:340      评论:0      收藏:0      [点我收藏+]

 

AlertDialog.Builder setCancelable用法

分类: android

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)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!