android-如何关闭AlertDialog.Builder对话框
2015-08-18 09:34
585 查看
AlertDialog.Builder对话框没有类似finish()或者dismiss()这样的方法。
但是它的父类AlertDialog有dismiss方法,而且AlertDialog.Builder在.show()的时候会得到一个AlertDialog对象,
我们就可以用dismiss方法将该Builder关闭。
[java] view
plaincopy
AlertDialog.Builder builder = new AlertDialog.Builder(this);
AlertDialog dialog = builder.show();
dialog.dismiss();
版权声明:本文为博主原创文章,未经博主允许不得转载。
from:http://blog.csdn.net/centralperk/article/details/7930569
但是它的父类AlertDialog有dismiss方法,而且AlertDialog.Builder在.show()的时候会得到一个AlertDialog对象,
我们就可以用dismiss方法将该Builder关闭。
[java] view
plaincopy
AlertDialog.Builder builder = new AlertDialog.Builder(this);
AlertDialog dialog = builder.show();
dialog.dismiss();
版权声明:本文为博主原创文章,未经博主允许不得转载。
from:http://blog.csdn.net/centralperk/article/details/7930569
相关文章推荐
- UILabel自动换行适应
- 设计模式之Builder
- HDOJ 1242 Rescue【BFS】
- hdu2454 Degree Sequence of Graph G(havel定理)
- Java对象的强、软、弱和虚引用原理+结合ReferenceQueue对象构造Java对象的高速缓存器
- iOS UI14_GET-POST
- iOS开发 -- UIButton
- Blue Jeans
- Reveal UI 分析工具简单使用
- UITabBar(第二次启动程序默认界面是上一次退出时的界面)
- UICollectionView的使用介绍
- UICollectionView的使用介绍
- nyoj 1100 WAJUEJI which home strong!
- UI导航控制器-----连载七
- Implementing Queue using Stacks
- Implementing Stacks Using Queues
- KVC中setValuesForKeysWithDictionary:
- UIImage尺寸调节
- UIActivityIndicatorView的详细使用
- Codeforces Round #316 (Div. 2) D. Tree Requests 树 离线在线 算法