gpt4 book ai didi

Android View 抖动

转载 作者:太空宇宙 更新时间:2023-11-03 12:25:40 27 4
gpt4 key购买 nike

正如您从下面的屏幕截图中看到的那样,“标题栏”在带有文本的区域中出现了这些丑陋的 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/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com