I want the Button
inside the editText
. I am attaching the screen shot. How can I do this? Please help me.
Something like this:
I want the Button
inside the editText
. I am attaching the screen shot. How can I do this? Please help me.
Something like this:
you can use below code.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="Enter search key" />
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_margin="5dp"
android:text="Verify"/>
</RelativeLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<EditText
android:layout_gravity="1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Mobile no" >
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Verify"/>
</EditText>
</LinearLayout>