简体   繁体   English

支持多种屏幕尺寸和方向

[英]supporting multiple screen sizes and orientation

Please help me... I create my first project in android and no any experience in android UI. 请帮帮我...我在android中创建了我的第一个项目,在android UI中没有任何经验。 ![enter image description here][1] ![在此处输入图片描述] [1]

res/layout/main.xml. RES /布局/main.xml。

res/layout-land/main.xml RES /布局土地/ main.xml

res/layout-large/main.xml res / layout-large / main.xml

res/layout-large-land/main.xml RES /布局大土地/ main.xml

res/layout-xlarge/main.xml 分辨率/布局-xlarge / main.xml

res/layout-xlarge-land/main.xml 分辨率/布局-xlarge-land / main.xml

res/layout-sw600dp/main.xml 分辨率/布局-sw600dp / main.xml

res/layout-sw600dp-land/main.xml 分辨率/布局-sw600dp-land / main.xml

res/layout-sw720dp/main.xml 分辨率/布局-sw720dp / main.xml

res/layout-sw720dp-land/main.xml 分辨率/布局-sw720dp-land / main.xml

this folder's layout structure is correct for handling every screen size? 此文件夹的布局结构是否适合处理每个屏幕尺寸?

and android version <3.2 and >3.2 supports for this? 和Android版本<3.2和> 3.2是否支持此功能?

If this is your first project in android, focus on building your initial UI without worrying about alternate adaptations for other devices. 如果这是您在android中的第一个项目,请专注于构建您的初始UI,而不必担心其他设备的替代改编。 Many times 1-2 layouts is enough (portrait/landscape) - If you stick to DP/SP units. 很多时候,1-2布局就足够了(纵向/横向)-如果您坚持使用DP / SP单元。

Once your initial UI is in place, test different devices in the emulator to see if you need to create any adaptations. 初始UI到位后,请在仿真器中测试其他设备,以查看是否需要创建任何改编。

Give a good idea about your question while asking . 问时给你一个好主意。

As a beginner you can just use res/layout and if u want to use in landscape mode use res/landscape mode. 作为初学者,您可以只使用res / landscape模式,如果要在横向模式下使用,请使用res / landscape模式。

Try to Start with these two . 尝试从这两个开始。 You Will Need Other Options Later . 以后您将需要其他选项。

Also Use sp , dp for size like font size or height . 也可以使用sp,dp来表示字体大小或高度。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM