Android progress bar control description

1、 ProgressBar progress bar

During the progress of a continuity work, in order not to make users feel that the program is dead, an active progress bar is required to indicate that the process is in progress.

When users browse the web, there must be a transmission process in the middle, so use the progress bar to make users wait patiently. For example, in the download application, it will also have a progress bar to display the download progress.

ProgressDialog is an interactive dialog window inherited from android.app.progressdialog. When applying, you must create a ProgressDialog object, and a "dialog" will pop up as a reminder at runtime. At this time, the background of the application will lose focus, and the control will not be handed over to the application until the process is over. If you don't want the background to lose focus in the activity, You also want to prompt the user that a background program is busy. At this time, the progressbar will come in handy.

You can customize some progress bars yourself. For example, it is defined as vertical or arc, and so on

Four ProgressBar styles:

2、 Seekbar drag bar (slider)

Seekbar can be used as a progress indicator and adjustment tool of music player, volume adjustment tool, etc. seekbar is a subclass of ProgressBar.

The drag bar is similar to the progress bar, but the difference is that the user can control. For example, in the application, the user can control the sound effect and the playback progress of music, which can be realized by using the drag bar. Because the drag bar can be controlled by the user, you need to listen to its events, which requires the implementation of the seekbar.onseekbarchangelistener interface.

Three events need to be monitored in seekbar: onprogresschanged, onstarttrackingtouch and onstoptrackingtouch. In onprogresschanged, we can get the size of the current value.

III. brief introduction to ratingbar (scoring progress bar)

Ratingbar is an extension based on seekbar (drag bar) and ProgressBar (status bar). It uses stars to display rating. When using the default ratingbar, users can set ratings by touching / dragging / pressing keys (such as remote control). Ratingbar comes with two modes: a small style ratingbarstylesmall and a large style ratingbarstyleindicator, Large ones are only suitable for instructions, not for interaction with users

The above is the description of Android progress bar control introduced by Xiaobian. I hope it will be helpful to you. If you have any questions, please leave me a message, and Xiaobian will reply to you in time. Thank you very much for your support for the programming tips website!

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>