ProgressBar, progessdialog – Usage (detailed explanation)

1、 ProgressBar

1. Common types

1.1 uncertain circular progress bar

No progress is displayed, which can be used as a cut-off animation. There are three sizes: large, medium and small. The default is medium.

1.2 bar progress bar

With display progress.

1.3 title bar uncertain progress bar

A circular progress bar with no progress displayed on the right side of the title bar.

1.4 title bar bar progress bar

The bar progress bar displayed at the top of the title bar can set the current progress through setprogess (int), with a maximum value of 10000.

2. Common control properties

3. Custom style

The user-defined drawable file is referenced through the Android: progressdrawable property of the control. Generally, three contents need to be defined: background, first progress and second progress.

example:

Pasting effect picture:

4. Key methods

5. Examples

The layout is simple, linear and arranged vertically. No code is pasted here, and a picture is pasted directly:

Java:

2、 ProgressDialog

1. Constructor

2. Key methods

In addition, in addition to these methods, ProgressDialog can also use the methods described in the progressbar above.

3. Examples

The above ProgressBar and progessdialog usage (detailed explanation) are all the contents shared by Xiaobian. I hope it can give you a reference and support more programming tips.

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
分享
二维码
< <上一篇
下一篇>>