ProgressBar is a progress bar, in the andoird there are bars, circles, etc., to present the progress of the event. The main definitions are as follows:
< ProgressBar Android:id = "@+id/progressbar1" style= "? android:attr/progressbarstylehorizontal" android:layout_width = "Fill_parent" android:layout_height= "wrap_content"/>
ProgressBar commonly used APIs are setup and get progress, examples are as follows:
Bar =(ProgressBar) Findviewbyid (R.ID.PROGRESSBAR1); Bar.setmax (100);//set the maximum value of the progress barBar.setprogress (50);//Set progress bar 1 Current ProgressBar.setsecondaryprogress (60);//Set progress bar 2 Current Progress FinalTimer timer =NewTimer (); Timer.schedule (NewTimerTask () {@Override Public voidrun () {//Modify the progress barBar.incrementprogressby (5); Bar.incrementsecondaryprogressby (5); } }, 1000, 5000);
Widgets (8, ProgressBar)