Change Android VideoView Orientation

I have a video VideoView

in an android app. When I do this in portrait orientation, the video fills the screen. But when I change orientation to landscape, the video takes up only half of the screen. I use FILL_PARENT

, FILL_PARENT

as the configuration parameters.

Is there a way the video can fill the screen in both orientations?

+2


a source to share


3 answers


Your video may be too small. You can focus it on the parents to make it look better. Or try requesting a larger video from your provider.



+1


a source


If it fills the screen perfectly in portrait mode, how will it perfectly match landscape mode without changing the aspect ratio?



The same goes for the opposite - if it fits perfectly in landscape mode, when you switch to portrait, it won't take up all of the vertical space.

+2


a source


You may want to consider creating two different layouts for portrait and landscape views. Let's assume you have a /res/layout/main.xml file. In the "/ res /" folder, create a child folder and name it "layout-land", the R file will be automatically generated! Here's a snapshot to keep it simple ...

alt text http://img826.imageshack.us/img826/5749/previewu.png

after you can edit each layout independently ... This is the most common way to deal with orientation changes when it comes to layouts.

Yours faithfully,

Igor

0


a source







All Articles