2

Is there a way to create a drawable folder and a values folder to 420 dpi and 560 dpi devices? One for the 420 dpi and one for 560 dpi.

420dpi: Samsung Galaxy S5, S4, LG G5, ...

560dpi: Nexus 6, Samsung S6, S7, ...

Because in those type of devices my app not looks well. Images in drawable-xxhdpi are smaller in a device with 420 dpi. Because multiplies the width of the image x 2,625 (density). I need bigger images or multiply images x 3.

4

3 回答 3

6

我找到的解决方案是创建一个 drawable-420dpi 和一个 drawable-560dpi 文件夹并分别复制 xxhdpi 和 xxxhdpi 资源。

我不确定这是不是最好的解决方案,但它适用于 PIXEL XL、Nexus 5X、6 和 6p 模拟器。

这对于开发人员和设计师来说也是非常令人沮丧的。

于 2017-10-31T08:58:37.287 回答
2

如果您使用Android Studio,您可以在与mipmap-hdpi、mipmap-mdpi、mipmap-xhdpi等文件夹相同的文件夹中轻松创建文件夹宽度名称:mipmap-420dpi和mipmap-560dpi。您可以看到这张图片

于 2017-12-20T15:03:43.610 回答
0

您可以使用 DisplayMetrics 获取 ppi,在获取 ppi 后,您可以使用 IF 条件并设置您需要设置的可绘制对象。

于 2017-02-16T20:52:59.683 回答