java - surfaceview播放视频想实现点击按钮由竖屏转变为横屏实现。。
高洛峰
高洛峰 2017-04-18 10:53:46
0
1
578

给下xml图片,

就是想点击了那个change按钮然后整个activity就能横屏显示,视频也将变成横屏播放,不知道该怎么做。。网上看了很多这方面的也没看懂。很多方法也有各种错误,没有实现。想问一下实现思路,应该也不会太难。。

高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

reply all(1)
迷茫

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!