我是靠谱客的博主 懵懂中心,这篇文章主要介绍dither抖动的使用,现在分享给大家,希望可以做个参考。

今天做东西时感觉使用一下抖动效果好看一下,当然有时候不明显,如果你需要看明显的效果的话 就应该方法图片来看

<?xml version="1.0" encoding="UTF-8"?>
<bitmap

xmlns:android="http://schemas.android.com/apk/res/android"

android:src="@drawable/b1"

android:dither="true" />
<?xml version="1.0" encoding="UTF-8"?>
<bitmap

xmlns:android="http://schemas.android.com/apk/res/android"

android:src="@drawable/b1"

android:tileMode="repeat"

android:dither="true" />
findViewById(R.id.ImageView01).getBackground().setDither(true);

如果要引用上面的可以设置 drawable来实现,

但是抖动不能直接应用在dialog中,因为里面的背景通常是透明 transparent 的,

可以间接使用getWindow().setFlags(WindowManager.LayoutParams.FLAG_DITHER, WindowManager.LayoutParam

最后

以上就是懵懂中心最近收集整理的关于dither抖动的使用的全部内容,更多相关dither抖动内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(116)

评论列表共有 0 条评论

立即
投稿
返回
顶部