Android: How to rotate a VideoView during playback
I am working on a project that utilizes the hardware on my Droid. As far as video is concerned, I initialize a mediaRecorder object, run it through all of its states, and then record a video. The video is successfully recorded and saved to the sd card.
In playing the video back, I have a layout with a VideoView object in it. I am decoding the video from its path on the sd card, and then I initialize the VideoView to play it. The problem I am having is that the video is playing sideways.
I'm having a LOT of trouble trying to find out how to rotate the VideoView so my video plays correctly (my video plays back in Portrait mode, and the activity is locked in this orientation as well).
I looked at the Android reference and it says that View has a method called setRotation. When I try to call this method in Eclipse I am getting compiler errors. I also cannot use an API above level 8 (Froyo).
链接地址: http://www.djcxy.com/p/46492.html