tags:

views:

49

answers:

1

Hi

I want to create a EditText and button that looks like this:

http://www.geting.se/image.php/249016-Untitled-3.jpg/full

This is almost the same as the quicksearch , but it is custom made, Can someone help me out?

+1  A: 

You should just be able to layout an EditText and a button next to each other, with 0 padding between them:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="horizontal"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
   <EditText android:paddingRight="0dp"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"/>
   <Button android:paddingLeft="0dp"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"/>
</LinearLayout>

To get the curved corners on the outsides, but not the insides, you might need to define a new style for your EditText and Button. See applying styles and themes.

Typically, you need to create a background image using 9-patch to get the curved corners with proper scaling. See Draw 9-patch

Mayra