I have written a similar function before, and it is implemented like this:
The full-screen playback interface is a new activity, and the layout file has only one root layout (such as RelativeLayout)
The controller of the video control (for example, the one I customized is called VideoPlayerHelper) is in global singleton mode
Click the full-screen button to jump to the full-screen activity. Add VideoPlayerView to the current interface through the root layout addView method of this activity, and display the progress information recorded by VideoPlayerHelper in singleton mode
I have written a similar function before, and it is implemented like this:
The full-screen playback interface is a new activity, and the layout file has only one root layout (such as RelativeLayout)
The controller of the video control (for example, the one I customized is called VideoPlayerHelper) is in global singleton mode
Click the full-screen button to jump to the full-screen activity. Add VideoPlayerView to the current interface through the root layout addView method of this activity, and display the progress information recorded by VideoPlayerHelper in singleton mode