guness
guness

Reputation: 6636

How to get tint value of Drawable programmatically

I am able to set tint of a drawable on runtime by programmatically as Drawable#setTintList. My question is how to get it in order to reuse later on during runtime, or is that even valid/possible?

Upvotes: 0

Views: 837

Answers (1)

Tanzeela Nisar
Tanzeela Nisar

Reputation: 86

you can use ImageView#getImageTintList() function to get the current ColorStateList used to tint the image drawable, or null if no tint is applied.

you can see more on android_documentation_for_image

Upvotes: 1

Related Questions