I am trying to do password visibility toggle in password field using EditText TextView (I dont want to use the android support TextInputLayout)
Everything working but how do I pace the ImageView In the right position beside the password EditText field.
This is what I have now
This is what I want
I want the image to be at that position inside the password EditText field.
My layout file
<EditText
android:layout_width="match_parent"
android:layout_height="50dp"
android:id="@+id/etPassword"
android:layout_marginRight="20dp"
android:inputType="textPassword"
android:layout_marginLeft="20dp"
android:layout_marginBottom="20dp"
android:paddingLeft="20dp"
android:background="@drawable/input_border"
android:hint="Your Password" />
<ImageView
android:id="@+id/show_pass_btn"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="5dp"
android:alpha=".5"
android:onClick="ShowHidePass"
android:padding="5dp"
android:src="@drawable/eye_show" />