<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:custom="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" > <LinearLayout android:id="@+id/arrow_button" android:layout_width="?attr/actionBarSize" android:layout_height="?attr/actionBarSize" android:layout_marginLeft="2dp" android:layout_marginTop="2dp" android:background="?attr/actionBarItemBackground" android:clickable="true" android:gravity="center" > <ImageView android:id="@+id/arrow" android:layout_width="wrap_content" android:layout_height="wrap_content" /> </LinearLayout> <include layout="@layout/search" /> </LinearLayout>