How to get android:tint=""
color from ImageView via code?
In XML is very easy to change tint color by just setting up the attribute android:tint="" in the ImageView tag, as shown in the following example.
Click the picture that you want to change. Under Picture Tools, on the Format tab, in the Adjust group, click Color. If you don't see the Format or Picture Tools tabs, make sure that you've selected a picture. You may have to double-click the picture to select it and open the Format tab.
To get the tint on all Android versions, use the ImageViewCompat:
int color = ImageViewCompat.getImageTintList(yourImageView).getDefaultColor();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With