Just set and no bird to use, only to see ...
Create a new XML in layout, called Main
<?XML version= "1.0" encoding= "Utf-8"?><LinearLayoutxmlns:android= "Http://schemas.android.com/apk/res/android"Android:layout_width= "Match_parent"Android:layout_height= "Match_parent"android:orientation= "vertical" > <ProgressBarAndroid:id= "@+id/progressbar2"style= "? Android:attr/progressbarstylelarge"Android:layout_width= "Wrap_content"Android:layout_height= "Wrap_content" /> <ProgressBarAndroid:id= "@+id/progressbar1"Android:layout_width= "Wrap_content"Android:layout_height= "Wrap_content" /><!--Central does not set - <ProgressBarAndroid:id= "@+id/progressbar3"style= "? Android:attr/progressbarstylesmall"Android:layout_width= "Wrap_content"Android:layout_height= "Wrap_content" /> <ProgressBarAndroid:id= "@+id/progressbar4"style= "? Android:attr/progressbarstylehorizontal"Android:layout_width= "Match_parent"Android:layout_height= "Wrap_content" /></LinearLayout>
Big Ring, Central ring, small ring, straight line progress bar.
Then go to the main file change, remember to change R.layout.main
PackageCom.example.deemo;Importandroid.app.Activity;ImportAndroid.os.Bundle;ImportAndroid.view.Window; Public classMainactivityextendsActivity {@Overrideprotected voidonCreate (Bundle savedinstancestate) {Super. OnCreate (savedinstancestate); //Enable window features to enable with progress and without progressrequestwindowfeature (window.feature_progress); Requestwindowfeature (window.feature_indeterminate_progress); Setcontentview (R.layout.main); //show two progress barsSetprogressbarvisibility (true); Setprogressbarindeterminatevisibility (true); Setprogress (9999);//progress of the straight progress bar, the maximum amount is 10000 }}
Simply Express ~ and try another function later.
Progress bar Simple Setup