Android progress bar ProgressBar style settings

Source: Internet
Author: User

Ordinary round ProgressBar

This type of progress bar is a process that represents a run, such as sending a text message, connecting to a network, and so on, indicating that a process is executing. It is generally as long as it is defined in the XML layout.

<progressbar android:id= "@+id/widget43"

Android:layout_width= "Wrap_content"

android:layout_height= "Wrap_content"

android:layout_gravity= "Center_vertical" >

</ProgressBar>

At this point, the style is not set, so it is a circular, always spinning progress bar.


Extra Large Round ProgressBar

At this point, after setting a style style attribute, the ProgressBar has a style, where the large ProgressBar style is: style= "? Android:attr/progressbarstylelarge" The complete XML definition is:

<progressbar android:id= "@+id/widget196"

Android:layout_width= "Wrap_content"

android:layout_height= "Wrap_content"

style= "Android:attr/progressbarstylelarge" >

</ProgressBar>


Small round ProgressBar

The corresponding style of the trumpet ProgressBar is: style= "? Android:attr/progressbarstylesmall" The complete XML definition is:

<progressbar android:id= "@+id/widget108"

Android:layout_width= "Wrap_content"

android:layout_height= "Wrap_content"

style= "Android:attr/progressbarstylesmall" >

</ProgressBar>

Title Type round ProgressBar

The style of the title-type ProgressBar is: style= "? Android:attr/progressbarstylesmalltitle" The complete XML definition is:

<progressbar android:id= "@+id/widget110"

Android:layout_width= "Wrap_content"

android:layout_height= "Wrap_content"

style= "Android:attr/progressbarstylesmalltitle" >

</ProgressBar>



@Override

protected void OnCreate (Bundle savedinstancestate) {

TODO auto-generated Method Stub

Super.oncreate (savedinstancestate);

Requestwindowfeature (window.feature_indeterminate_progress);

request window featured style, set here as an ambiguous schedule style

Setcontentview (R.layout.second);

Setprogressbarindeterminatevisibility (TRUE);

Sets whether an ambiguous progress bar in the title bar can be displayed

}



This article is from the "Day South Side" blog, please make sure to keep this source http://phpnan.blog.51cto.com/2641199/1654546

Android progress bar ProgressBar style settings

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.