<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/my_shape_file"
android:orientation="horizontal"
android:padding="0dp" >
<EditText
android:id="@+login/txtPassword"
android:layout_width="fill_parent"
android:layout_height="40dp"
android:background="@drawable/my_shape_file"
android:hint="Password"
android:paddingLeft="20dp"
android:password="true"
android:paddingBottom="0dp"
android:singleLine="true"
android:textSize="13sp" >
</EditText>
<ImageView
android:id="@+login/imgForgotPWD"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="8dp"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
android:padding="0dp"
android:src="@drawable/forgotpwd" >
</ImageView>
</RelativeLayout>
Add a code snippet to your website: www.paste.org