Examples of four common dialog boxes in Android

1. Dialog notification

When your application needs to display a progress bar or the user needs to confirm the information, you can use the dialog box to complete it.

The following code will open a dialog box as shown in the figure:

2. Create a dialog box with a single option list

3. Create a dialog box with a multi option list

4. Progress dialog

Use the code ProgressDialog Show (progressdialogactivity. This), "please wait", "data loading...", true); Create and display a progress dialog box. Call the setprogressstyle () method to set the style of the progress dialog box. There are two styles:

The following code implements the horizontal progress bar style:

The above is an example of the four common Android dialog boxes introduced to you by Xiaobian. I hope it will help you. If you have any questions, please leave me a message, and Xiaobian will reply to you in time. Thank you very much for your support for the programming tips website!

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>