Android Growth Diary-progressbar Design

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.