问题描述
所以,我的工作我的扩展应用到不同的屏幕尺寸。现在它的10.1英寸的屏幕优化,但我正在努力得到它的Kindle Fire的其中有一个7英寸的屏幕上运行。我只使用相对布局。截至目前我的背景秤完美,但ontop背景的图像按钮不扩展,我想知道是否有一个原因。另外我用利润来调整我的按钮的位置,这样行吗缩放大小?
So I'm working on scaling my application to different screen sizes. Right now Its optimized for a 10.1 inch screen but I'm working to get it to run on the kindle fire which has a 7 inch screen. I'm only using relative layouts. As of now my background scales perfectly but the image buttons ontop of the background don't scale and I was wondering if there was a reason for this. Also I use margins to adjust the positions of my buttons, is this okay for scaling sizes?
推荐答案
您应该总是定义你的清单中,因为的的从一个版本切换到另一个。
You should always define 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应用程序,以不同的屏幕尺寸的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!