Android横向布局

时间:2016-12-20 08:06:06

标签: android android-layout android-fragments

我有一个活动,我有一个片段(矩形框)。即使我创建了景观布局也没有显示。我的肖像xml文件是这样的。  First one land and second one is portrait and the down is the Result 但是当我将我的模拟器转换为横向模式时,它会在图像的结果中显示。 但是当在清单文件中更改android:screenOrientation="landscape"时,它会完美无缺,但如果我使用android:configChanges="orientation|screenSize

它显示了同样的问题。

1 个答案:

答案 0 :(得分:1)

res/layout-land中创建一个文件夹,并将横向视图xml文件放在此文件夹中,名称相同。这样可以解决您的问题。

enter image description here