<?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="?android:actionBarSize" android:background="@color/titleColor"> <ImageView android:id="@+id/ivBack" android:layout_width="wrap_content" android:layout_height="match_parent" android:gravity="center" android:paddingLeft="@dimen/size_dp_15" android:src="@drawable/back" android:paddingRight="@dimen/size_dp_15" android:textColor="@color/textColor" android:textSize="@dimen/textSize16" /> <FrameLayout android:layout_width="match_parent" android:layout_height="match_parent" android:focusable="true" android:focusableInTouchMode="true"> <EditText android:id="@+id/et_search" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_margin="@dimen/size_dp_10" android:background="@drawable/shape_edit_radius4_white" android:gravity="center" android:hint="请输入搜索内容" android:textSize="@dimen/textSize16" /> <ImageView android:id="@+id/ivSearch" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_gravity="right" android:paddingLeft="@dimen/size_dp_15" android:background="?android:selectableItemBackground" android:paddingRight="@dimen/size_dp_15" android:src="@drawable/search_black" /> </FrameLayout> </LinearLayout>