title: Place ImageView over Button android
body: <p>I am trying to place an ImageView over a Button using RelativeLayout. Here is my xml:</p>
  
  <pre><code>&lt;RelativeLayout
                  android:layout_width="0dip"
                  android:layout_height="match_parent"
                  android:layout_margin="10dp"
                  android:layout_weight="0.50" &gt;
  
                  &lt;Button
                      android:id="@+id/btnFindDaysInBetween"
                      android:layout_width="match_parent"
                      android:layout_height="match_parent"
                      android:background="@color/blue_500"
                      android:text="@string/dt_text_days" /&gt;
  
                  &lt;ImageView
                      android:id="@+id/imageview_find_days_in_between"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_centerInParent="true"
                      android:contentDescription="@string/empty"
                      android:src="@drawable/ic_check_circle_white" /&gt;
              &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>Here is the image screenshot:</p>
  
  <p><img src="https://i.stack.imgur.com/DpBLj.png" alt="enter image description here"></p>
  
  <p>As you can see, the ImageView's src image is not visible. However if i change the button at the back to an ImageView, the image of the top ImageView is visible. Please refer below..</p>
  
  <p>Changed xml:</p>
  
  <pre><code> &lt;RelativeLayout
                  android:layout_width="0dip"
                  android:layout_height="match_parent"
                  android:layout_margin="10dp"
                  android:layout_weight="0.50" &gt;
  
                  &lt;!-- 
                  &lt;Button
                      android:id="@+id/btnFindDaysInBetween"
                      android:layout_width="match_parent"
                      android:layout_height="match_parent"
                      android:background="@color/blue_500"
                      android:text="@string/dt_text_days" /&gt;
                  --&gt;
                  &lt;ImageView
                      android:id="@+id/imageview_find_days"
                      android:layout_width="match_parent"
                      android:layout_height="match_parent"
                      android:layout_centerInParent="true"
                      android:contentDescription="@string/empty"
                      android:src="@drawable/ic_send_black" /&gt;
  
                  &lt;ImageView
                      android:id="@+id/imageview_find_days_in_between"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_centerInParent="true"
                      android:contentDescription="@string/empty"
                      android:src="@drawable/ic_check_circle_white" /&gt;
              &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>Changed xml's screenshot:</p>
  
  <p><img src="https://i.stack.imgur.com/r8noM.png" alt="enter image description here"></p>
  
  <p>What is it that i am doing wrong in the first layout?</p>