问题
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