Android的muliple屏支持? [英] Android muliple screen support?

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

问题描述

我要设计一个应用程序,它根据三种分辨率支持。为此我使用code清单中
 

I have to design an application which to support under three resolution. for that i use the code in manifest

和还创建三个文件夹的布局,布局大,布局小支持三种分辨率,相应地,我把不同的分辨率绘制,华电国际,绘制,LDPI,绘制,MDPI,但形象每当我运行的应用程序不同分辨率是要采取低分辨率的图像,而不是不同的分辨率我使用。

and also create three folder layout , layout-large, layout-small for supporting three resolution, correspondingly i put the different resolution of image in drawable-hdpi ,drawable-ldpi ,drawable-mdpi , but whenever i run the app in different resolution it going to take low resolution image instead of different resolution i use.

我不`吨知道我犯了错,我是否必须添加一些code布局XML与否。我也搜索Android开发者论坛,我做应用程序的设计,因为他们坚持。

I don`t know where i made the mistake, whether i have to add some code in layout xml or not. I also search the android developer forum and i do the application design as they insist.

中的任何一个提出了一些想法,实现this.Thanks

Any one suggest some idea to achieve this.Thanks

推荐答案

有两件事你可以检查:是否设置为您的应用程序的最低SDK版本使用第4版(Android 1.6的)支持这一启动

There are two things you could check: have you set the minimum SDK version of your app to use version 4 (Android 1.6) support for this started?

其次,的布局大的和的布局小的文件夹是针对不同的大小的屏幕(想想片与电话),而不是解析度。如果你改变了设备的分辨率(DPI),你需要使用的布局华电国际布局LDPI 的等。

Secondly, the layout-large and layout-small folders are designed for different sized screens (think tablet vs phone), and not resolution. If you're changing the resolution (DPI) of the device, you'll need to use layout-hdpi, layout-ldpi etc.

此外,如果只有你改变图像,你应该把不同的图像中的绘制,华电国际绘制-LDPI 的等,而不是布局-XXXX 的。如果一个支持的设备上,Android将挑选图像从正确的文件夹,所以你只能有一个布局文件夹(如果你使用或2的布局土地的)

Further, if it's only the images you're changing, you should be placing the different images in drawable-hdpi, drawable-ldpi etc, and not layout-xxxx. If on a supported device, Android will pick the image from the correct folder, so you'll only have one layout folder (or 2 if you use layout-land)

部分(或全部:S),这些点都包括在这个环节,在StackOverflow的另一个问题。试着问一个问题之前使用搜索功能。此外,你会发现人们更容易接受向用户提供答案,具有较高的接受百分比。

Some (or all :S) of these points are covered in this link, to another question on StackOverflow. Try to use the search function before asking a question. Also, you'll find people are more receptive to providing answers to users with higher accept percentages.

<一个href=\"http://stackoverflow.com/questions/3438926/andriod-layout-large-folder-is-been-ignored\">Andriod - 布局 - 大文件夹被忽略

编辑:多屏支持,还看片段更好地组织和适合你的内容为大型和小屏幕设备(的 dev.Android ,的样例

for multiple screen support, also look at Fragments to better organise and fit your content for both large and small screen devices (dev.Android, worked example)

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

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