Android layout make only one view draw itself as though its in landscape, but everything else use portrait

岁酱吖の 提交于 2020-01-04 09:09:08

问题


The main view element in the layout for my activity is a VideoView. My video is rendered to the landscape resolution of the device, but all of the content in the video is sideways, so its still meant to be viewed while the device is in the portrait position even though I have to set my activity to android:screenOrientation="landscape" in my manifest (I have to do that or else the video doesn't take up the full screen). My question is: Is it possible for me to set a parameter on my video view that tells it to use landscape mode but have everything else that happens in my app be oriented for portrait mode? Similar to the android:orientation="horizontal/vertical" tag for LinearLayouts.


回答1:


My question is: Is it possible for me to set a parameter on my video view that tells it to use landscape mode but have everything else that happens in my app be oriented for portrait mode?

No, sorry.

On Android 3.0, you could try playing around with android:rotation, but I fear that this may slow things down tremendously. Plus, of course, it's only on 3.0.



来源:https://stackoverflow.com/questions/5500478/android-layout-make-only-one-view-draw-itself-as-though-its-in-landscape-but-ev

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