Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android imageview tint

Tags:

android

While setting tint for an ImageView in xml, I am getting a warning that shows:-

Must use app:tint instead of android:tint

Why should I use app:tint?

like image 990
Kishor Avatar asked Oct 08 '20 05:10

Kishor


People also ask

What is ImageView in android?

Displays image resources, for example Bitmap or Drawable resources. ImageView is also commonly used to apply tints to an image and handle image scaling.

What is android ImageButton?

Displays a button with an image (instead of text) that can be pressed or clicked by the user. By default, an ImageButton looks like a regular Button , with the standard button background that changes color during different button states.


1 Answers

Because there were some issues where android:tint wasn't working for version < 21. app:tint works under version 21. Here is a similar problem. Drawable tinting for api <21

like image 61
Zankrut Parmar Avatar answered Oct 06 '22 00:10

Zankrut Parmar