1. ProgressBar progress bar
In order to prevent users from feeling that the program is dead during the progress of a continuation work, an activity progress bar needs to be found, indicating that the process is in progress.
When users browse web pages, there must be a transmission process in the middle, so use the progress bar to let users wait patiently. For example, in the download application, it will also have a progress bar to display the download progress.
ProgressDialog is inherited from the designed interactive dialogue window. When applying, a new ProgressDialog object must be created. A "dialog box" will pop up as a reminder when running. At this time, the application background loses focus and will not hand over control to the application until the process is over. If you do not want the background to lose focus in the activity, and you also want to prompt the User that a background program is in a busy stage, ProgressBar will come in handy.
You can customize some progress bars by yourself. For example, it is defined as vertical or arc shape, etc.
Four progressbar styles:
Android:attr/progressBarStyle、android:attr/progressBarStyleHorizontal android:progressBarStyleLarge、android:progressBarStyleSmall
2. SeekBar drag bar (sliding bar)
SeekBar can be used as a progress indicator and adjustment tool, volume adjustment tool, etc. SeekBar is a subclass of ProgressBar.
The drag bar is similar to a progress bar, the difference is that the user can control it. For example, in the application, the user can control the sound effects and control the music playback progress, etc., all of which can be achieved using the drag bar. Since the drag bar can be controlled by the user, it needs to be listened to, which requires the implementation of the interface.
There are three events that need to be listened to in SeekBar, namely: onProgressChanged, onStartTrackingTouch, and onStopTrackingTouch. In onProgressChanged we can get the size of the current value.
A brief introduction to three RatingBar (rating progress bar)
RatingBar is based on the extension of SeekBar and ProgressBar (status bar), and uses stars to display ratings. When using the default RatingBar, users can set ratings by touching/dragging/buttons (such as remote control). RatingBar comes with two modes, a small style ratingBarStyleSmall, the large style is ratingBarStyleIndicator, the large one is only suitable for instructions and is not suitable for interaction with users.
The above is the Android progress bar control description introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to everyone in time. Thank you very much for your support for my website!