Android视图抖动

Android视图抖动,第1张

概述正如您从下面的屏幕截图中看到的那样,“标题栏”将这些丑陋的条带线跨越区域,文本可以扩展整个屏幕宽度.它在真实设备上更加引人注目. 有什么方法可以解决这个问题吗? 从 Android Developers: Widget Design Guidelines开始: In some cases, devices have low pixel depths that can cause visual ba 正如您从下面的屏幕截图中看到的那样,“标题栏”将这些丑陋的条带线跨越区域,文本可以扩展整个屏幕宽度.它在真实设备上更加引人注目.

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

解决方法 从 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视图抖动全部内容,希望文章能够帮你解决Android视图抖动所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1121691.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-29
下一篇2022-05-29

发表评论

登录后才能评论

评论列表(0条)

    保存