I have to create a custom component like this:
How to write its custom component?
For setting icon on left side of edittext, you can use this:
android:drawableLeft="@mipmap/icon_username"
where "icon_username" is an image
Set hint like this:
android:hint="username"
To draw border around edittext you should use separate drawable file(xml file)
Sample code for drawable file:
edittext_lines.xml
:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:top="30dp">
<shape
android:shape="rectangle">
<stroke android:width="1dp" android:color="#FFFFFF" />
<solid android:color="#FFFFFF" />
</shape>
</item>
</layer-list>
Final code may look like:
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="Username"
android:background="@drawable/edittext_lines"
android:drawableLeft="@drawable/round_profile_icon"/>