Android - 多屏支持问题 [英] Android - Multiple Screen support issue

查看:18
本文介绍了Android - 多屏支持问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在设计一个支持平板电脑的 Android 应用程序,但我在多屏支持方面遇到了一个小问题.

I am designing an Android Application that will support Tablets, but i am facing a small issue regarding the Multiple Screen Support.

谁能告诉我,下面的布局设计

Can anyone tell me, for the below layout design

 res/layout/my_layout.xml             // layout for normal screen size ("default")

 res/layout-small/my_layout.xml       // layout for small screen size

 res/layout-large/my_layout.xml       // layout for large screen size

 res/layout-xlarge/my_layout.xml      // layout for extra large screen size

 res/layout-xlarge-land/my_layout.xml // layout for extra large in landscape orientation

我们在 Manifest 文件中指定以下代码.

we specify the below code in Manifest file.

<supports-screens

 android:largeScreens="true"

 android:normalScreens="true"

 android:smallScreens="true"

 android:resizeable="true"

 android:anyDensity="true"
 />

现在如果布局如下,代码将保持不变;

Now will the code remains the same if the layouts are as below;

res/layout/main_activity.xml           # For handsets (smaller than 600dp available width)

res/layout-sw600dp/main_activity.xml   # For 7" tablets (600dp wide and bigger)

res/layout-sw720dp/main_activity.xml   # For 10" tablets (720dp wide and bigger)

是否必须在 Manifest 文件中定义 ?如果我不定义怎么办.请帮我.

Is it compulsory to define in Manifest file?? What if I don't define. Please help me.

推荐答案

Android开发教程

Android Development Tutorial

Android 支持数百种具有多种不同屏幕尺寸的设备类型,从小型手机到大型电视机.因此,重要的是您将应用程序设计为与所有屏幕尺寸兼容,以便尽可能多的用户使用它.但兼容不同的设备类型是不够的.每种屏幕尺寸都为用户交互提供了不同的可能性和挑战,因此为了真正满足和打动您的用户,您的应用程序必须不仅仅是支持多个屏幕:它必须针对每个屏幕配置优化用户体验.- 查看更多信息:http://fireandroids.blogspot.in/2014/01/developing-different-screen-sizes.html#sthash.tWtbmwLc.dpuf

Android powers hundreds of device types with several different screen sizes, ranging from small phones to large TV sets. Therefore, it’s important that you design your application to be compatible with all screen sizes so it’s available to as many users as possible. But being compatible with different device types is not enough. Each screen size offers different possibilities and challenges for user interaction, so in order to truly satisfy and impress your users, your application must go beyond merely supporting multiple screens: it must optimize the user experience for each screen configuration. - See more at: http://fireandroids.blogspot.in/2014/01/developing-different-screen-sizes.html#sthash.tWtbmwLc.dpuf

这篇关于Android - 多屏支持问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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