Android Dialogs(1)Dialog简介及Dialog分类
Dialogs
A dialog is a small window that prompts the user to make a decision or enter additional information. A dialog does not fill the screen and is normally used for modal events that require users to take an action before they can proceed.

Dialog Design
For information about how to design your dialogs, including recommendations for language, read the Dialogs design guide.
The Dialog class is the base class for dialogs, but you should avoid instantiating Dialog directly. Instead, use one of the following subclasses:
AlertDialog- A dialog that can show a title, up to three buttons, a list of selectable items, or a custom layout.
DatePickerDialogorTimePickerDialog- A dialog with a pre-defined UI that allows the user to select a date or time.
- ProgressDialog
Android includes another dialog class called ProgressDialog that shows a dialog with a progress bar. However, if you need to indicate loading or indeterminate progress, you should instead follow the design guidelines for Progress & Activity and use aProgressBar in your layout.
These classes define the style and structure for your dialog, but you should use a DialogFragment as a container for your dialog. TheDialogFragment class provides all the controls you need to create your dialog and manage its appearance, instead of calling methods on the Dialog object.
Using DialogFragment to manage the dialog ensures that it correctly handles lifecycle events such as when the user presses the Backbutton or rotates the screen. The DialogFragment class also allows you to reuse the dialog's UI as an embeddable component in a larger UI, just like a traditional Fragment (such as when you want the dialog UI to appear differently on large and small screens).
The following sections in this guide describe how to use a DialogFragment in combination with anAlertDialog object. If you'd like to create a date or time picker, you should instead read the Pickers guide.
Note: Because the DialogFragment class was originally added with Android 3.0 (API level 11), this document describes how to use the DialogFragment class that's provided with the Support Library. By adding this library to your app, you can use DialogFragment and a variety of other APIs on devices running Android 1.6 or higher. If the minimum version your app supports is API level 11 or higher, then you can use the framework version of DialogFragment, but be aware that the links in this document are for the support library APIs. When using the support library, be sure that you import android.support.v4.app.DialogFragment class and not android.app.DialogFragment.
Android Dialogs(1)Dialog简介及Dialog分类的更多相关文章
- Android Dialogs(5)[正常显示dlg,将Fragment显示为dialog,将Aty显示为dlg,嵌入],关闭Dialog
Showing a Dialog When you want to show your dialog, create an instance of your DialogFragment and ca ...
- Android Dialogs(3)警示Dialog教程[创建,单选,复选,自定义]等等
本节内容 1. Building an Alert Dialog 2. Adding buttons 3. Adding a list 4. Adding a persistent multiple- ...
- Android Dialogs(4)Dialog事件处理
Passing Events Back to the Dialog's Host When the user touches one of the dialog's action buttons or ...
- Android自定义底部带有动画的Dialog
Android自定义底部带有动画的Dialog 效果图 先看效果图,是不是你想要的呢 自定义Dialog package --.view; import android.app.Dialog; imp ...
- Android自定义类似ProgressDialog效果的Dialog
Android自定义类似ProgressDialog效果的Dialog. 方法如下: 1.首先准备两张自己要定义成哪样子的效果的图片和背景图片(也可以不要背景). 如我要的效果: 2.定义loadin ...
- [Android Pro] service中显示一个dialog 或者通过windowmanage显示view
转载: http://blog.csdn.net/huxueyan521/article/details/8954844 通过windowmananger来在窗口上添加view的时候,需要设置aler ...
- Android开发:使用DialogFragment实现dialog自定义布局
使用DialogFragment实现dialog的自定义布局最大的好处是可以更好控制dialog的生命周期. TestFragment的代码: public class TestFragment ex ...
- Android学习(十九)Dialog对话框
一.什么是Dialog对话框 对话框是当前页面中弹出的一个小窗口,用于显示重要的提示信息,提示用户输入信息,确认信息,或者显示某种状态,如下载进度,退出提示等等.用户需要与对话框进行交互,才能回到原窗 ...
- Android线程中使用Toast、dialog、loading
代码改变世界 Android线程中使用Toast.dialog.loading Loading: Thread t1 = new Thread(new Runnable() { @Override p ...
随机推荐
- Error Code: 2006 - MySQL 鏈嶅姟鍣ㄥ凡绂荤嚎
将sql文件导入到mysql时候,就一直报这个错误. 我试过网上各种方法都行不通. 最后将以下一句运行了一下就能够了,并且没有重新启动mysql. SET GLOBAL max_allowed_pac ...
- javascript是什么?
JavaScript 是脚本语言 JavaScript 是一种轻量级的编程语言. JavaScript 是可插入 HTML 页面的编程代码. JavaScript 插入 HTML 页面后,可由全部的现 ...
- JAVA学习第六十四课 — 反射机制
Java反射机制是在执行状态中,对于随意一个类,都可以知道这个类的全部属性和方法,对于随意一个对象,都可以调用它的随意一个方法和属性,这样的动态获取的信息以及动态调用对象的方法的功能称为java ...
- Got error: 1449: The user specified as a definer ('root'@'%') does not exist when using LOCK TAB
在linux下,用mysql的导出语句: mysqldump -hlocalhost -uroot -pPasswd table >/home/ftp/test.sql 出现了 mysqldum ...
- 微信通过openID发送消息/后台post、get提交并接收数据 C# .NET 配置404,500等错误信息 连接字符串
微信通过openID发送消息/后台post.get提交并接收数据 控制器:下面是post发送消息(微信不支持从前台发送数据,之前试过,报错,需要跨域,跨域的问题解决后还不行,最后发现之后后端提交 ...
- 从程序员角度看ELF | Linux-Programming (转)
★概要: 这片文档从程序员的角度讨论了linux的ELF二进制格式.介绍了一些ELF执行 文件在运行控制的技术.展示了如何使用动态连接器和如何动态装载ELF. 我们也演示了如何在LINUX使用GNU ...
- (ros/moveit)cob_simulation報錯
cob_simulation報錯 依照官網說明 http://wiki.ros.org/cob_bringup_sim 1. git clone https://github.com/ipa320/c ...
- java语法基础(四)
继承 继承概述 继承是面向对象语言的三大基本特性(封装,继承,多态)之一. 一个类可以继承另外一个类,继承的类称为子类(也可以叫派生类),被继承的类称为父类(或者也叫基类,超类). 通过继承,子类可以 ...
- mongodb05---游标
游标cursor: 通俗的说,游标不是查询结果,而是查询的返回资源,或者接口. 通过这个接口,你可以逐条读取.就像php中的fopen打开文件,得到一个资源一样, 通过资源,可以一行一行的读文件. v ...
- Linux设备驱动--块设备(二)之相关结构体
上回最后面介绍了相关数据结构,下面再详细介绍 块设备对象结构 block_device 内核用结构block_device实例代表一个块设备对象,如:整个硬盘或特定分区.如果该结构代表一个分区,则其成 ...