简体   繁体   中英

How to set fab icon tint to null programmatically?

I used the image on the fab button and the result is like this :

在此处输入图片说明

and set app:tint="@null" for original image and the result is :

在此处输入图片说明

but what I want is... I want to set tint @null programmatically

or how to achieve the same result programmatically

我认为它看起来像这样:

yourFabName.getDrawable().mutate().setTint(...the tint value you want goes here);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM