title: android : make imageview full screen size
body: <p>I know this has been asked in stackoverflow few times ; I tried all the answers in vain. I have a custom imageview (for scroll/zoom) in my android app. I programmatically set the image to be displayed in the imageview (so, the imageview is empty in the IDE). However I try, there seems to be some padding to the left &amp; top of the imageview which am unable to remove. Please help. This is the code (the following is one of the possible options I tried from stackoverflow)
  It's not possible to change the scaletype from matrix as my code for touch/zoom depends on the matrix scale type.</p>
  
  <p><strong>activity_main.xml</strong></p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:orientation="vertical"
  tools:context=".ActivityHome" &gt;
  
  &lt;myTouchImageView
  android:id="@+id/imgView"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:layout_gravity="center_horizontal"
  android:layout_marginLeft="0dp"
  android:layout_marginTop="0dp"
  android:scaleType="matrix" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>However, this is what I get :</p>
  
  <p><img src="https://i.stack.imgur.com/nYUzx.png" alt="enter image description here"></p>