Android Self-paced notes ProgressBar properties, common methods and use of the progress bar

Source: Internet
Author: User

1, properties:
android:progress= "0"----set the initial value of the first level progress bar
android:max=---Set the maximum value of the progress bar
Android:secondaryprogress= "10"--Set the initial value of the second level progress bar


2. Common methods of the progress bar:
int Getmax (): Returns the maximum value of this progress bar
int getprogress (); Returns the current progress of the progress bar
int getsecondprogress (): Returns the current minor progress
void Incrementprogressby (int diff): Specifies the incremental progress, the pace of each advance
Boolean isinderterminate (): Indicates whether the progress bar is in indeterminate mode
void Setindeterminate (Boolean indeterminate): Set in indeterminate mode for a time task that cannot be determined

void setvisibility (int v): Sets whether the progress bar is visible.

3. Use

<span style= "font-family:kaiti_gb2312;" ><progressbar        style= "? Android:attr/progressbarstylelarge"        android:layout_width= "Wrap_content"        android:layout_height= "50sp"        android:progress= "0"        android:max= "        android:secondaryprogress" = "Ten"        android:id= "@+id/progressbar"        android:layout_below= "@+id/progressbar"        android:layout_ Alignbottom= "@+id/progressbar"/></span>


Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Android Self-paced notes ProgressBar properties, common methods and use of the progress bar

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.