Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apply Color Filter with xml in ImageView

I've got an ImageView and programmatically I can change its color using imageView.setColorFilter(Color.RED). There is something similar using xml??

like image 923
Manuel Castro Avatar asked Feb 09 '15 16:02

Manuel Castro


People also ask

How do I change the color of an ImageView tint XML?

Tint color means when we want to change the color of the image while rendering in ImageView. 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.

Where is colors XML in Android Studio?

XML file saved at res/values/colors.

What is color XML in Android Studio?

colors. xml is an XML file which is used to store the colors for the resources. An Android project contains 3 essential colours namely: colorPrimary. colorPrimaryDark.


1 Answers

Yes, it's android:tint. Here you have more info.

like image 126
Jofre Mateu Avatar answered Oct 20 '22 06:10

Jofre Mateu