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

我发现要将文档理顺,其实最好就是全文翻译,但我不想这么做,我就把大致的理一下.方便自己和别人以后查阅使用.

AlertDialog
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.
ProgressDialog
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.
DatePickerDialog
A dialog that allows the user to select a date. See the Hello DatePicker tutorial.
TimePickerDialog
A dialog that allows the user to select a time. See the Hello TimePicker tutorial.

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.

 

下面开始介绍,我们将要看到击中Dialogh ,图中是,我做实验的6种Dialog.

Showing a Dialog

Dialog 是作为Activity的一部分显示.常规的创建一个Dialog需要用Activity的 onCreateDialog(int)方法.如果,你要在该方法外面创建Dialog的话,该Dialog不会与Activity绑定,但你可以用 setOwnerActivity

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值