Android customized seekbar to realize video playback progress bar
First, let's take a look at the renderings, as shown below:
The progress bar is as follows:
Next, let's talk about my idea. The progress drag bar above has a custom thumb. There is a popupwindow window directly above the thumb, which displays the current playback time. There is a text box on the right of seekbar to display the current playback time / total time.
Step1. First take a look at the layout file of popupwindow, seek_ Pop.xml, as shown in the following figure:
Step 2. Customize a seekbar
Step3. Add the customized drag bar to the layout file. The following is part of the code
Step4. Monitor the drag bar in the main file
The method of converting progress value to time maketimestring (int secs) is as follows:
Of course, here is just a brief introduction to the custom progress bar, and the style of the progress bar is not displayed. The style readers can define it themselves.
The above is the whole content of this article. I hope it will be helpful to your study, and I hope you can support programming tips.