다른 주제를 읽었지만 문제가 해결되지 않았습니다. BottomNavigationView와 3 개의 조각이 있습니다. 하나의 조각에서 툴바/SearchView + RecyclerView (카드 포함)와 기본 BottomNavigationView가 있습니다.BottomNavigationView가 스크롤 할 때 숨기지 않습니다. RecyclerView 내부에
질문 : RecyclerView가 포함 된 조각에서 스크롤 목록을 숨길 때 도구 막대와 NavigationView를 숨기고 도구 모음을 숨길 수 있지만 숨길 수는 없지만 BottomNavigationView를 숨길 수 있습니다. 그리고이 블록은 목록에서 마지막으로 나타납니다.
코드를 따라 ...
activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="#F5F5F5"
android:id="@+id/coordinatorLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:id="@+id/framePrincipal"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<android.support.design.widget.CollapsingToolbarLayout
android:fitsSystemWindows="true"
app:layout_scrollFlags="scroll|enterAlways"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.BottomNavigationView
app:layout_collapseMode="parallax"
app:layout_scrollFlags="scroll|enterAlways"
app:itemIconTint="@color/item_bot_navigation"
app:itemTextColor="@color/item_bot_navigation"
app:elevation="10dp"
android:background="@android:color/holo_orange_dark"
app:menu="@menu/menu_bottom_view"
android:layout_gravity="bottom"
android:id="@+id/botNavView"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</android.support.design.widget.BottomNavigationView>
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.CoordinatorLayout>
fragment_receitas.xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
android:background="@drawable/fundo_1"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
<android.support.design.widget.AppBarLayout
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.design.widget.CollapsingToolbarLayout
android:fitsSystemWindows="true"
app:layout_scrollFlags="scroll|enterAlways"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.Toolbar
app:layout_scrollFlags="scroll|enterAlways"
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v7.widget.SearchView
android:id="@+id/searchViewReceitas"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</android.support.v7.widget.Toolbar>
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
<android.support.v7.widget.RecyclerView
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:padding="5dp"
android:scrollbars="vertical"
android:id="@+id/recyclerViewReceitas"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</android.support.design.widget.CoordinatorLayout>
만이 조각은 도구 모음/SearchView있다!
안녕하세요,이 문제를 해결 했습니까? 나는 똑같아. – zys
대답은 https://stackoverflow.com/questions/44777869/hide-show-bottomnavigationview-on-scroll입니다. –