Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/kotlin/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在android中以编程方式旋转特定视图的横向或纵向?_Android_Android Layout_Screen Orientation - Fatal编程技术网

如何在android中以编程方式旋转特定视图的横向或纵向?

如何在android中以编程方式旋转特定视图的横向或纵向?,android,android-layout,screen-orientation,Android,Android Layout,Screen Orientation,如何在android中以横向或纵向模式动态旋转特定视图。我正在使用这种方法 setRequestedOrientation(ActivityInfo.SCREEN\u ORIENTATION\u横向) 但它的总体布局将进入景观模式。但我想在景观模式下看到特定的景观。 所以,请告诉我有谁知道。提前感谢所有的以下是我用来将您的活动显示为横向模式的代码 <activity android:screenOrientation="landscape" android:configChanges="

如何在android中以横向或纵向模式动态旋转特定视图。我正在使用这种方法

setRequestedOrientation(ActivityInfo.SCREEN\u ORIENTATION\u横向)

但它的总体布局将进入景观模式。但我想在景观模式下看到特定的景观。
所以,请告诉我有谁知道。提前感谢所有的

以下是我用来将您的活动显示为横向模式的代码

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

根据需要更换