title: How Can I scale the image on Edit Text
body: <p>I want to dynamically add an image in EditText. I followed <a href="https://stackoverflow.com/questions/3703283/how-can-i-add-an-image-on-edittext">this question</a> to do that and I have succeeded. but, the thing is I cannot scale this image to the size of my text field. It is smaller than my text field.</p>
  
  <p>Here is my text field.</p>
  
  <pre><code> &lt;EditText
                  android:id="@+id/codeEdit"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:background="@drawable/ic_passcode"
                  android:width="200dp"
                  android:height="1000dp"
                  android:layout_marginTop="20dp"
                  android:ems="10"
                  android:gravity="center"
                  android:inputType="textPassword"&gt;
                  &lt;requestFocus /&gt;
              &lt;/EditText&gt;
  </code></pre>
  
  <p>It displays like this.</p>
  
  <p><a href="https://i.stack.imgur.com/Qld9H.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Qld9H.jpg" alt="image"></a></p>
  
  <p>How can I scale this image?</p>