I want to dynamically add an image in EditText. I followed this question 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.
Here is my text field.
<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">
<requestFocus />
</EditText>
It displays like this.
How can I scale this image?