Android View 抖动

标签 android user-interface dithering

正如您从下面的屏幕截图中看到的那样,“标题栏”在带有文本的区域中出现了这些丑陋的 strip ,这些 strip 延伸了整个屏幕的宽度。它在真实设备上更加明显。

有什么办法可以解决这个问题吗?

activity

最佳答案

来自 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" />

关于Android View 抖动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2210976/

相关文章:

java - 连接到 Mysql 数据库 - JDBC 或 PHP

java - 使用带有 FragmentActivity 的 SimpleCursorAdapter 为 SMS URI 返回空

android - 在android xml中重新使用自定义格式

python - 从 Bokeh 中的图形中删除线

javascript - 使用适用于 Zebra 打印机的 PHP 或 Javascript 将 RGB 图像转换为 Floyd-Steinberg 图像

android - 是否可以使用 32 位 (ARGB_8888) 表面格式的动态壁纸?

Android Studio 1.1.0 Gradle 项目同步失败在 OSX 上导入 Gradle 项目时出错

java - 是否可以限制TextField(不是JTextField)中输入的长度

C++ 和图形

c - 2色抖动