如何删除或撤消视图上的ColorFilter或setColorFilter?
发布于 2011-08-20 05:31:07
您是否尝试过将其设置为null
根据Android Documentation的说法
公共无效setColorFilter (ColorFilter cf)
自: API级别1将任意颜色滤镜应用于图像。参数
cf应用(可能为空)的colorfilter
发布于 2012-05-18 09:19:57
您可以对调用setColorFilter()的同一对象调用clearColorFilter()。这种方法等同于setColorFilter(null),并且可以说比后者更具可读性。
发布于 2017-02-01 17:21:11
试试这个:
Drawable play = ContextCompat.getDrawable(MainActivity.this, R.drawable.ic_action_play_arrow);
play.clearColorFilter();
view.invalidate(); // This is helpful when you apply morethan one color filter另外两个答案也很有帮助。但是,当我使视图无效时,它对我是有效的。
https://stackoverflow.com/questions/7127521
复制相似问题