Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove Tint Color Programmatically in Android [duplicate]

Tags:

android

I want to programmatically remove (reset) my ImageView Tint color which was already set in XML layout.

like image 448
Md.Tarikul Islam Avatar asked Jul 20 '17 04:07

Md.Tarikul Islam


1 Answers

I think if above things doesn't works, you can try adding the image again to the imageview programatically, while adding it again programatically dont set tintcolor for it, it will be inflated with the original color

    myImgView.setImageResource(R.drawable.yourDrwable);

or i think this should work for you.

    imageview.setColorFilter(null)

or

    imageView.clearColorFilter()
like image 70
Uday Ramjiyani Avatar answered Oct 30 '22 11:10

Uday Ramjiyani