You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can use MaterialToolbar. setNavigationIconTint(@ColorInt int navigationIconTint) to set the tint of the navigation icon. But it seems that there is no way to clear it. After looking through the source code, I think it will resolve the issue that simply changing the type of the parameter "navigationIconTint" from "int" to "Integer".
The text was updated successfully, but these errors were encountered:
However, there is a DrawableCompat#setTintList method which takes a nullable ColorStateList. I tried using that and it seems to work; however, a key detail is that it will also clear any tint like android:tint="?attr/colorControlNormal" in the vector drawable xml, meaning the navigation icon drawable will take on the color of the android:fillColor.
So basically I can add a materialToolbar.clearNavigationIconTint() method to do the above, but I'm not sure how useful it will be.
What's your exact use case? Why do you have to set a tint and then clear it?
Hi, @dsn5ft, sorry for not replying in time. In my project, there is an activity that loading data from the server continuously. If the data is abnormal, the navigation icon ( and some other elements in UI ) will be changed to a special color to alert the user. If the data is normal, the navigation icon should be changed back to the normal color.
I can use MaterialToolbar. setNavigationIconTint(@ColorInt int navigationIconTint) to set the tint of the navigation icon. But it seems that there is no way to clear it. After looking through the source code, I think it will resolve the issue that simply changing the type of the parameter "navigationIconTint" from "int" to "Integer".
The text was updated successfully, but these errors were encountered: