Android: How to start video activity on portrait mode

百般思念 提交于 2019-12-23 17:26:52

问题


I am trying to play video from url using the following code:

Intent intent= new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.parse(movieurl), "video/*");
startActivity(intent);

When I intent started it show the video player in landscape mode is it possible to set it to portrait mode?


回答1:


That functionality is provided by the videoplayer. The videoplayer has been set to show video in landscape mode..U can use videoview and mediacontroller to create your own media player.



来源:https://stackoverflow.com/questions/6353444/android-how-to-start-video-activity-on-portrait-mode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!