我该如何编程旋转特定视图横向或纵向在android系统? [英] How can i rotate the particular view landscape or portrait programatically in android?

查看:202
本文介绍了我该如何编程旋转特定视图横向或纵向在android系统?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在android的旋转横向或纵向模式下的特定视图动态。我现在用的这个方法。

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);

setRequestedOrientation (ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);

但总的布局要landscapmode。但我想在横向模式下特定视图。
所以,请告诉我,任何人都知.Advance感谢所有

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

推荐答案

以下是code这是我用来显示你的活动为横向模式

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

这篇关于我该如何编程旋转特定视图横向或纵向在android系统?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆