Fabricio
Fabricio

Reputation: 7925

How to get tint color from ImageView via code

How to get android:tint="" color from ImageView via code?

Upvotes: 10

Views: 3079

Answers (1)

Rafael Chagas
Rafael Chagas

Reputation: 804

To get the tint on all Android versions, use the ImageViewCompat:

int color = ImageViewCompat.getImageTintList(yourImageView).getDefaultColor();

Upvotes: 9

Related Questions