什么分辨率可绘制的,我应该使用此显示指标? [英] What resolution of Drawables i should use for this display metrics?

查看:167
本文介绍了什么分辨率可绘制的,我应该使用此显示指标?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要让我的应用程序的多个屏幕支持。所以要实现这个我读了Android开发guildeline https://developer.android.com/guide /practices/screens_support.html 和我创建了不同的绘制和布局文件夹,把图片大小不同。

我测试了在不同设备上的应用程序,它看起来罚款这些设备,而我发现,在7平板电脑的图像是太小了。证实了这一点,我创建简单的项目,不同的文件夹中把图像的同名并发现该设备使用 LDPI 可绘制在一般用于在 LDPI 绘制的大小 36X36 ,并导致问题,如果我增加此绘制尺寸那么它不会与其他低密度设备兼容。

下面是对此我该设备的 Dispaly指标有问题。

  {密度= 0.75,宽度= 800,高度= 444,scaledDensity = 0.75,xdpi = 160.0,ydpi = 160.42105}

如何处理这个问题呢?如果任何人有这个问题之前,那么请给我一些建议。任何想法和帮助将AP preciated。

感谢和放大器;问候


解决方案

您可以在此获得更多的控制权:

有些值可能使用这里常见的屏幕尺寸:


  • 320,与屏幕配置,如设备:

    1. 为240x320 LDPI(QVGA手机)

    2. MDPI小320x480(手机)

    3. 480x800的华电国际(高密度手机)


  • 480,为480×800作为MDPI(平板电脑/手机)的屏幕等。

  • 600,屏幕为诸如600x1024 MDPI(7平板电脑)。

  • 720,屏幕为诸如720x1280 MDPI(10平板电脑)。

只要指定设备宽度并把你的编辑过的图像,适合最好在相应的开关< N> DP在你的情况文件夹 SW< 444 GT; DP

您也应该看看其他预选赛了使Android选择的图像在运行时(屏幕像素密度,可用宽度,高度可用,屏幕尺寸或屏幕高宽比)。通过结合这些限定词,仔细测试,你将确保用户拥有每个设备上的最佳体验。

不久,就把你的形象绘制-SW℃在444> DP文件夹。 (444-小屏幕公吨)

I want to make my application to multiple screen support. so to achieve this i read the Android developers guildeline https://developer.android.com/guide/practices/screens_support.html and i have created the different drawable and layout folders to put different size of images.

I tested the application in different devices and it looks fine in those devices, while i found that in one of 7" tablet the images are too small. to confirm this i created simple project and put same name of images in different folder and found that this device uses ldpi drawables and in generally the size of ldpi drawable used to be 36x36 and that causes the issue, if i increase this drawable size then it will not compatible with other low-density devices.

Here is the Dispaly Metrics of the device in which i am having a problem.

{density=0.75, width=800, height=444, scaledDensity=0.75, xdpi=160.0, ydpi=160.42105}

How to deal with this problem ? if anyone have this issue before then please give me some advice. any idea and help will be appreciated.

Thanks & Regards

解决方案

You can get more control over this:

Some values you might use here for common screen sizes:

  • 320, for devices with screen configurations such as:

    1. 240x320 ldpi (QVGA handset)
    2. 320x480 mdpi (handset)
    3. 480x800 hdpi (high density handset)

  • 480, for screens such as 480x800 mdpi (tablet/handset).
  • 600, for screens such as 600x1024 mdpi (7" tablet).
  • 720, for screens such as 720x1280 mdpi (10" tablet).

Just specify your device width and put your edited image that fits the best in corresponding sw<N>dp folder in your case sw<444>dp.

You should also have a look at other qualifiers that make Android choosing image at runtime (screen density, Available width, Available height, Screen size or Screen aspect). By combining these qualifiers and testing carefully you will be sure that the user has the best experience on each device.

Shortly, put your image under drawable-sw<444>dp folder. (444-smaller screen metric)

这篇关于什么分辨率可绘制的,我应该使用此显示指标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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