正如您从下面的屏幕截图中看到的那样,“标题栏”将这些丑陋的条带线跨越区域,文本可以扩展整个屏幕宽度.它在真实设备上更加引人注目. 有什么方法可以解决这个问题吗? 从 Andro
有什么方法可以解决这个问题吗?
从 Android Developers: Widget Design Guidelines开始:In some cases, devices have low pixel
depths that can cause visual banding
and dithering issues. To solve this,
application developers should pass
assets through a “proxy” drawable
defined as XML:. This technique
references the original artwork, in
this case “background.9.png”, and
instructs the device to dither it as
needed.
编辑:
示例来源.这是res / drawables目录中的xml文件:
<?xml version="1.0" encoding="UTF-8"?> <bitmap xmlns:android="http://schemas.android.com/apk/res/android" android:src="@drawable/title_bar_medium" android:dither="true" />