How can we overlay the icon with rectangular shape in android -


i want design ui shown @ image below. we're unable that. here code

<linearlayout     android:layout_width="match_parent"     android:layout_height="wrap_content"     android:orientation="vertical">     <edittext         android:id="@+id/editshop"         android:drawableleft="@drawable/user_icon"         android:background="@drawable/rectangle"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:layout_marginleft="20dp"         android:layout_marginright="20dp"         android:layout_margintop="20dp"         android:hint="shopname"         android:inputtype="text"         android:padding="7dp"         android:singleline="true" /> </linearlayout> 

i want output like:

try this.

<relativelayout xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_width="match_parent"     android:layout_height="match_parent">      <edittext         android:id="@+id/editshop"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:background="@drawable/rectangle"         android:layout_marginleft="20dp"         android:layout_marginright="20dp"         android:layout_margintop="20dp"         android:hint="shopname"         android:inputtype="text"         android:padding="7dp"         android:singleline="true" />      <imageview         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:src="@drawable/user_icon"         android:layout_alignbottom="@+id/editshop"         android:layout_alignparentleft="true"         android:layout_alignparentstart="true" />  </relativelayout> 

Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -