在android中添加横向方向和代码的最简单方法 [英] Easiest way to add landscape Orientation And code in android
问题描述
我是 android
新手,想知道如何在 android
中添加 landscape
模式,谁能告诉我最简单的方法那.我正在寻找一种非常简单的方法.
I am new in android
and want to know how to add landscape
mode in android
can anyone tell me about the easiest way to do that. I'm looking for a way that is very simple.
如果您有此类问题,请查看下面的答案.
If you have this kind of question check the answer below.
谢谢....
推荐答案
我有一个最简单的方法来添加 landscape
模式(添加 landscape 文件夹
, landscapexml 文件
和代码)在 android studio
中.您只需单击一两次即可完成此操作.
当您在 xml
文件中打开时,请查看右侧的 preview panel
显示您的设备单击 按钮和点击switch to layout-land
.它会自动将 layout_land.xml
文件添加到您的文件结构中,并在代码中打开它 &预览.
检查下面的图像...
I have a simplest way to add a landscape
mode (add landscape folder
, landscape xml file
and code) in android studio
. You just have to click one or two times to do that.
when you are in xml
file opened look at the right there is a preview panel
that show your device click the button and click on switch to layout-land
. It Automatically adds layout_land.xml
file into your file structure AND also opens it in code & preview.
Check the image below...
这篇关于在android中添加横向方向和代码的最简单方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!