如何设计应用程序,支持多屏设备和平板电脑在Android中 [英] How to design application to support multi-screen devices and tablets in Android
问题描述
如果一个应用程序需要支持从Android 1.6的设备,并开始启动。该应用程序还必须支持片剂。什么事情我都在创建应用程序来考虑。我已阅读如何支持多个屏幕的。我觉得作为描述的总结有
If an application have to support starting from android 1.6 device and onwards. The application also have to support tablets. what are the things i have to consider while creating the app. I have read How to Support Multiple Screens. I think the summary as described there is
- 明确声明其屏幕尺寸清单您 应用程序支持(摘要-1)
- 在不同的屏幕尺寸(摘要-2) 提供不同的布局
- 提供不同的屏幕密度(摘要-3) 不同的位图可绘
- Explicitly declare in the manifest which screen sizes your application supports (summary-1)
- Provide different layouts for different screen sizes (summary-2)
- Provide different bitmap drawables for different screen densities(summary-3)
由于我要支持所有的设备,从1.6开始起,包括片剂我是否必须使用<支持屏>
。它是我的应用程序了有用吗? (概要-1)
As I have to support all devices starting from 1.6 onwards including tablets whether I have to use <supports-screens>
. Is it useful for my applicaiton? (summary-1)
我无法为不同尺寸的布局。因为在未来的任何设备可能会与一些different_size。但我必须支持所有的屏幕尺寸。 (摘要-2)
I cannot create layout for different size. because the in future any device may come with some different_size. But I have to support all screen size. (summary-2)
我明白,我要创建不同的可绘制的文件夹,以支持不同的分辨率,还支持多尺寸我要创建的所有图像为9补丁。 (摘要-3)
I understood that I have to create different drawable folders to support different resolution and also to support multi-size i have to create all images as 9-patch. (summary-3)
只有我知道的使用(提供不同的......)我的应用程序。我没有使用其他两点我的问题。另外这里一个疑问是,那是正确的,如果我创建华电国际,LDPI和MDPI绘制文件夹或我还需要创建xhdpi?
Only I understood the use of (Provide different...) for my application. I didn't get the use of other two points for my problem. Also a doubt here is that is it ok if i create hdpi, ldpi and mdpi drawable folder or I need to create xhdpi also?
任何人都可以建议我什么其他的事情,我必须考虑到如果我想我的应用程序应该是相同的,在这样一个范围广泛的设备(从1.6+到片也可以)的工作作为同一
推荐答案
您应该始终定义&LT;支持屏&GT;
在清单中,因为的默认值可以从一个版本切换到另一个。
You should always define <supports-screens>
in your manifest because the default values can change from one version to another.
但如果你想支持 XLARGE
屏幕,那么你就完蛋了,因为这个属性是在API级别9(Android 2.3的)介绍。你必须创建两个不同的APK,一个用于Android的版本> = 2.3,另一个是老的。
But if you want to support xlarge
screens then you're stuck because this attribute was introduced in API level 9 (android 2.3). You have to create two different APKs, one for android versions >= 2.3 and the other for the older ones.
由于这是一个常见的问题,Android提供了一个很好的方式只能发布即使你使用多个APK市场上的一个应用程序。
Since it's a common issue, android provides a nice way to publish only one application on the market even if you use multiple APKs.
不过Android 1.6的重新presents rel="nofollow">的市场份额的1.3%现在。要花费大量的时间来支持旧版本是否确定?
However Android 1.6 represents about 1.3% of the market share right now. Are you sure you want to spend a lot of time to support this old version?
这篇关于如何设计应用程序,支持多屏设备和平板电脑在Android中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!