Android_文档学习_UI_Creating Dialogs
Creating Dialogs
Android中的Dialog,(既对话框). 包括1)AlertDialog 2) ProgressDialog 3) DatePickerDialog 4) TimePickerDialog 5) Custom Dialog
本文测试代码csdn下载频道:http://download.csdn.net/source/2903639
我发现要将文档理顺,其实最好就是全文翻译,但我不想这么做,我就把大致的理一下.方便自己和别人以后查阅使用.
- A dialog that can manage zero, one, two, or three buttons, and/or a list of selectable items that can include checkboxes or radio buttons. The AlertDialog is capable of constructing most dialog user interfaces and is the suggested dialog type. See Creating an AlertDialog below.
- A dialog that displays a progress wheel or progress bar. Because it's an extension of the AlertDialog, it also supports buttons. See Creating a ProgressDialog below.
- A dialog that allows the user to select a date. See the Hello DatePicker tutorial.
- A dialog that allows the user to select a time. See the Hello TimePicker tutorial.
AlertDialog ProgressDialog DatePickerDialog TimePickerDialog If you would like to customize your own dialog, you can extend the base Dialog object or any of the subclasses listed above and define a new layout. See the section on Creating a Custom Dialog below.
下面开始介绍,我们将要看到击中Dialog
,图中是,我做实验的6种Dialog.
Showing a Dialog
Dialog 是作为Activity的一部分显示.常规的创建一个Dialog需要用Activity的 onCreateDialog(int)方法.如果,你要在该方法外面创建Dialog的话,该Dialog不会与Activity绑定,但你可以用 setOwnerActivity
本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!
