我想在行动栏中的线性布局搜索视图中实现。我想实现回到按钮图标到搜索视图我们在行动栏中做了什么。任何想法将是欣赏 像这样
我的布局
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.CardView
android:id="@+id/searchView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardElevation="2dp"
android:layout_margin="10dp"
>
<android.support.v7.widget.SearchView
android:id="@+id/sv"
android:layout_width="match_parent"
android:layout_height="40dp"
app:queryHint="Поиск по каталогу"
>
</android.support.v7.widget.SearchView>
</android.support.v7.widget.CardView>
<android.support.v7.widget.RecyclerView
android:layout_below="@+id/searchView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/list_result">
</android.support.v7.widget.RecyclerView>
<com.github.rahatarmanahmed.cpv.CircularProgressView
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/progress_view"
android:layout_width="40dp"
android:layout_height="40dp"
app:cpv_animAutostart="true"
app:cpv_indeterminate="true"
cpv_color="@color/colorPrimary"
android:layout_centerHorizontal="true"
android:layout_marginTop="55dp"/>
</RelativeLayout>