How can i rotate the particular view landscape or portrait programatically in android?

牧云@^-^@ 提交于 2019-12-26 05:07:53

问题


how can rotate the particular view in Landscape or portrait mode in dynamically in android. i am using the this method

setRequestedOrientation (ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);

but it total layout going to landscapmode .but i want particular view in landscape mode. so,please tell me anyone known .Advance thanks to all


回答1:


Following is code which i used to display your activity into landscape mode

<activity android:screenOrientation="landscape" 
android:configChanges="orientation|keyboardHidden" 
android:name="yourActivty"/>

Change it according to your need



来源:https://stackoverflow.com/questions/26293222/how-can-i-rotate-the-particular-view-landscape-or-portrait-programatically-in-an

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