title: Remove ImageView border in Android
body: <p>I am making an app that uses cards to display information, and I want to have an image on the left side of the card. The problem I'm having is that the ImageView I'm inserting at the left side is being padded on all sides for some reason. </p>
  
  <p>After doing some searching online, I found many posts on stackoverflow that were asking the same question, and all of them were told to use this code fix their issue:</p>
  
  <pre><code>android:adjustViewBounds="true"
  </code></pre>
  
  <p>and to simply add this within their ImageView in the xml. I tried this, but the padding remains. I have set the background color of the image view to lime green to illustrate the padded areas.</p>
  
  <p>Here is my XML code for the card:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.v7.widget.CardView
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:card_view="http://schemas.android.com/apk/res-auto"
      android:orientation="horizontal"
      android:layout_width="match_parent"
      android:layout_height="100dp"
      android:layout_margin="2dp"
      android:clickable="true"
      android:foreground="?android:attr/selectableItemBackground"
      card_view:cardCornerRadius="5dp"
      &gt;
  
      &lt;RelativeLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"&gt;
  
          &lt;ImageView
              android:id="@+id/drinkImage"
              android:layout_width="100dp"
              android:layout_height="match_parent"
              android:adjustViewBounds="true"
              android:background="#00FF00"
              android:gravity="left"
              /&gt;
  
          &lt;TextView
              android:padding="8dp"
              android:id="@+id/drinkName"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:textSize="24sp"
              android:layout_toRightOf="@+id/drinkImage"
              /&gt;
  
          &lt;TextView
              android:padding="8dp"
              android:id="@+id/drinkDesc"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_below="@+id/drinkName"
              android:layout_toRightOf="@+id/drinkImage"
              /&gt;
  
      &lt;/RelativeLayout&gt;
  &lt;/android.support.v7.widget.CardView&gt;
  </code></pre>
  
  <p>and this is what I'm getting on my screen:</p>
  
  <p><a href="https://i.stack.imgur.com/bVaR4.png" rel="nofollow noreferrer">http://i.stack.imgur.com/bVaR4.png</a></p>
  
  <p><img src="https://i.stack.imgur.com/bVaR4.png" alt="enter image description here"></p>