The old usage of ProgressBar and progessdialog
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 usage of the above commonplace ProgressBar and progessdialog is all that Xiaobian has shared with you. I hope it can give you a reference and support more programming tips.