У меня есть CoordinatorLayout
который содержит AppBarLayout
и FrameLayout
который содержит фрагменты.Fix bottom bar in CoordinatorLayout
Один из этих фрагментов содержит TabLayout
сверху, один лоток для листа RecyclerView
и на нижней панели «домашняя» панель инструментов.
AppBarLayout
конфигурируется с app:layout_scrollFlags="scroll|enterAlways"
Моя проблема заключается в том, что как «Панели инструментов» скрываются при Улитка, AppBarLayout и мой «домашний» на панели инструментов в нижней части. Это текущее поведение
Я хотел бы, чтобы зафиксировать нижнюю «самодельный» на панели инструментов, чтобы сохранить видима, но я не могу добиться.
Это XML макета фрагмента
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
<android.support.design.widget.TabLayout
android:id="@+id/toolbarfilter"
android:layout_width="match_parent"
android:background="@color/azul_asde"
app:tabMode="fixed"
app:tabMaxWidth="0dp"
android:elevation="4dp"
app:tabIndicatorColor="@color/verde_pastel"
android:layout_height="wrap_content"
/>
<android.support.v4.widget.SwipeRefreshLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/swipeContainer"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<android.support.v7.widget.RecyclerView
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</android.support.v4.widget.SwipeRefreshLayout>
<LinearLayout
android:id="@+id/toolbarselection"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:background="@color/azul_asde"
android:elevation="4dp"
android:visibility="visible"
>
<ImageView
android:id="@+id/delete"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:src="@drawable/ic_delete_white_24dp"
android:tint="@color/gris_desactivado" />
<ImageView
android:id="@+id/select"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:src="@drawable/ic_bookmark_border_white_24dp"/>
<ImageView
android:id="@+id/send"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:src="@drawable/ic_send_white_24dp"
android:tint="@color/gris_desactivado" />
</LinearLayout>
</LinearLayout>
EDIT1:THIS вопросы, кажется, та же проблема.
Не могли бы вы сделать мне одолжение и показать нам, как вы прячетесь нижняя планка? Я не могу понять это ... (мне не нужен верхний батончик, только внизу) – AndreiBogdan
Hi Hanzo, Вы нашли решение этой проблемы? – Sharath
можете ли вы разместить свой XML-файл, который содержит 'CoordinatorLayout' –