android creating search ui similar to Searchable
<p>i need to implement the android search ,my default values is a Arraylist and search result is cursor object ,so i go for my own search ,but i need the search ui similar to android search ui,how can i create this ,please help me,i have tried a lot ,but i won't get this perfection<img src="http://i.stack.imgur.com/vePQf.png" alt="enter image description here"> </p>

<pre><code>&lt;RelativeLayout
            android:orientation="horizontal"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:gravity="center"&gt;

            &lt;ImageView
                android:id="@+id/appIcon"
                android:layout_height="39dp"
                android:layout_width="39dp"
                android:layout_alignParentLeft="true"
                android:layout_centerVertical="true"
                android:background="@drawable/angiicon" /&gt;
            &lt;RelativeLayout
                android:layout_width="243dp"
                android:id="@+id/rr1"
                android:layout_marginTop="5dp"
                android:layout_marginLeft="5dp"
                android:layout_toRightOf="@+id/appIcon"
                android:gravity="center_vertical"
                android:layout_height="wrap_content"&gt;
                &lt;EditText
                    android:id="@+id/categoryListEditText"
                    android:layout_width="202dp"
                    android:text=" "
                    android:layout_height="wrap_content"
                    android:singleLine="true"
                    android:hint="Search Angie’s List"
                    android:inputType="textVisiblePassword"
                    android:imeOptions="actionSearch"
                    android:paddingRight="34dp"

                    /&gt;
                   &lt;Button android:id="@+id/buttonClearText"
                    android:layout_centerVertical="true"
                    android:layout_width="48dp"
                    android:layout_marginRight="8dp"
                    android:layout_height="30dp"
                    android:visibility="invisible"
                    android:background="@drawable/clear_button"
                    android:layout_alignRight="@+id/categoryListEditText"/&gt;
                &lt;ProgressBar
                    android:id="@+id/ProgressBarcat"
                    style="@android:style/Widget.ProgressBar.Small.Inverse"
                    android:layout_width="wrap_content"
                    android:visibility="invisible"
                    android:layout_toLeftOf="@+id/companySearch"
                    android:layout_centerVertical="true"
                    android:layout_height="wrap_content"&gt;&lt;/ProgressBar&gt;
                &lt;ImageButton
                    android:id="@+id/companySearch"
                    android:background="@drawable/btn_search_dialog"
                    android:src="@drawable/ic_menu_search"
                    android:layout_width="43dp"
                    android:layout_marginTop="0.05dp"
                    android:layout_height="41dp"
                    android:layout_marginLeft="8dip"
                    android:layout_alignParentRight="true" /&gt;




            &lt;/RelativeLayout&gt;
    &lt;/RelativeLayout&gt;
</code></pre>
