9个补丁图像以xhdpi密度错误地压缩

9个补丁图像以xhdpi密度错误地压缩

本文介绍了9个补丁图像以xhdpi密度错误地压缩的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在XHDPI中显示9补丁程序映像时出现问题.

I have problems with a 9 patch image when displayed in XHDPI.

Android似乎有一个错误,因为在HDPI中显示时正确显示了

It seems as there were a bug in Android because when displayed in HDPI is displayed correctly:

但是当在XHDPI中显示时,会产生非常奇怪的效果(请看一下半透明的标签中间:

but when displayed in XHDPI it makes a very strange effect (look at the middle of the tab that is semitransparent:

这很奇怪,我看不到为什么在XHDPI中以这种方式工作.基本上de 9 patch是一个单行渐变,viewpager指示器需要一定的透明边距:

It's very strange and I can't see why it'sworking this way when in XHDPI. Basically de 9 patch is a one line gradient with some transparent margin needed for the viewpager indicator:

推荐答案

是的使我朝着正确的方向前进.我的问题是,测试手机(Nexus 5)不是XHDPI设备,而是XXHDPI设备.从XHDPI转换为XXHDPI时需要缩放,这解释了Yoah也适用于我的情况.

Yoah put me in the right direction. My problem was that testing phone (Nexus 5) is not a XHDPI device, it's a XXHDPI device. And as scaling is needed to convert from XHDPI to XXHDPI what explains Yoah applies to my case also.

这篇关于9个补丁图像以xhdpi密度错误地压缩的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 21:58