Removing an imageview background color

1

I'm using Glide library for downloading images and displaying them in my adapter, the problem is, after it sets the images, they get a background that is not in the downloaded image, the ImageView added this color to them

this is an example:

enter image description here

as you can see it has a very light green background color, the image it self has white background.

things I've tried so far:

  • set white background color in my xml layout
  • set transparent background color
  • used View.setBackgroundColor(Color.TRANSPARENT) in my adapter
  • used View.setBackgroundColor(0x00000000) in adapter

nothing worked... how can I get rid of it?

::EDit

the layout file attached :

    <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
        android:layout_height="match_parent">

        <ImageView
            android:id="@+id/flag"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_centerInParent="true"
            android:adjustViewBounds="true"
            android:backgroundTint="#fff"
            android:background="#fff" />

    </RelativeLayout>
android
android-imageview
android-glide
android-image
asked on Stack Overflow May 23, 2019 by Navid Abutorab • edited May 23, 2019 by Navid Abutorab

1 Answer

0

Image with transparent backgroundImage that you have on link

Look at the image, which has a white background. Try to add a transparent image and your problem will be solved. I removed the background of that image. Look at the difference between these two images.

answered on Stack Overflow May 23, 2019 by Ncit Cosmos

User contributions licensed under CC BY-SA 3.0