Key attributes of ProgressBar
android:max=----maximum display progress
android:progress= "----First show progress
Android:secondaryprogress= "---" Second show progress
Android:indeterminate= "true"---settings are displayed accurately
Ps:true: Inaccurate display of progress///false: accurate display of progress
---------------------------------------------------------------
Key methods of ProgressBar
1. setprogress (int) Set the first progress
2. setsecondaryprogress (int) Set second progress
3. Getprogress () Get the first progress
4. Getsecondaryprogress () Get second progress
5. Incrementprogressby (int) Increase or decrease the first progress
6. Incrementsecondaryprogressby (int) Increase or decrease the second progress
7. Getmax () Get Maximum progress
--------------------------------------------------------------------
ProgressDialog page Style
1. New ProgressDialog Object
2. Setting the display style
3. Setting the title
4. Setting the contents of the dialog box
5. Settings icon
Eg:
prodialog=New progressdialog (Showprogressbar. this); Prodialog.setprogressstyle (ProgressDialog. Style_horizontal);
Prodialog.settitle ("Mu class net");
Prodialog.setmessage ("Welcome everyone support MU class net");
Prodialog.seticon (r.drawable. Ic_launcher);
Setting the properties of a ProgressBar
* 1. Set the maximum value
* 2. Set initialization
* 3. Whether the progress bar clearly shows the progress (False:yes;true:no)
Prodialog.setmax (100);
Prodialog.incrementprogressby (50);
Prodialog.setindeterminate (false);
Set OK button
Prodialog.setbutton (dialoginterface. Button_positive, "OK", new Dialoginterface.onclicklistener () {
@Override
Public void OnClick (dialoginterface arg0, int arg1) {
Toast. Maketext (Showprogressbar. This, "Welcome everyone to support MU class net", Toast. length_short). Show ();
}
})
Sets whether you can exit the dialog box by returning a button
Prodialog.setcancelable (true);
Show ProgressDialog
Prodialog.show ();
Android Growth Diary-progressbar Design