Status Update
Comments
al...@android.com <al...@android.com>
ch...@google.com <ch...@google.com>
bo...@gmail.com <bo...@gmail.com> #3
I'm going to leave this here as well, for reference: http://stackoverflow.com/questions/40171801/bottomnavigationview-hides-when-scrolling-up-instead-of-down
In my use case, the BottomNavigationView is inside a fragment, inside a FrameLayout which is contained in a CoordinatorLayout and the scroll to hide technique works, but in reverse compared to how it's supposed to work. Using the BottomNavigationView directly inside the CoordinatorLayout doesn't have any scroll behavior though.
In my use case, the BottomNavigationView is inside a fragment, inside a FrameLayout which is contained in a CoordinatorLayout and the scroll to hide technique works, but in reverse compared to how it's supposed to work. Using the BottomNavigationView directly inside the CoordinatorLayout doesn't have any scroll behavior though.
bo...@gmail.com <bo...@gmail.com> #4
I'm having the same issue. There is an estimation when this issue will be fixed?
ch...@google.com <ch...@google.com> #6
Scroll behavior is still missing. For those that are looking for one, sample project archive contains it.
ch...@google.com <ch...@google.com> #12
You can't cast shadow to the top. I tried to add android:elevation="40dp" and android:elevation="8dp" on a solid background but still I was unable to see the shadow cast on the top, shadow is cast only below the BNV (this is perfectly normal). Given this, I said that top divider should be available for all version to achieve top shadow.
lu...@gmail.com <lu...@gmail.com> #13
I was just confused by what app:itemBackground was for, but that makes sense. thanks!
ch...@google.com <ch...@google.com> #14
When is the scrolling behavior planned to be released?
ka...@gmail.com <ka...@gmail.com> #15
I have updated to the new Support Library version (25.1.0) and I still see no shadow above the BNV, see attached screenshot.
<android.support.design.widget.BottomNavigationView
android:elevation="40dp"
android:id="@+id/bottom_navigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="@color/darkestGray"
app:itemIconTint="@drawable/nav_item_color_state"
app:itemTextColor="@drawable/nav_item_color_state"
app:menu="@menu/bottom_navigation_widget" />
<android.support.design.widget.BottomNavigationView
android:elevation="40dp"
android:id="@+id/bottom_navigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="@color/darkestGray"
app:itemIconTint="@drawable/nav_item_color_state"
app:itemTextColor="@drawable/nav_item_color_state"
app:menu="@menu/bottom_navigation_widget" />
ma...@lehung.de <ma...@lehung.de> #16
Updated to 25.1.0. Shadow doesn't displayed.
<android.support.design.widget.BottomNavigationView
android:id="@+id/bottom_navigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="@color/colorPrimary"
android:elevation="8dp"
app:elevation="8dp"
app:itemIconTint="@drawable/bottom_nav_color_state"
app:itemTextColor="@drawable/bottom_nav_color_state"
app:menu="@menu/bottom_navigation_main"/>
<android.support.design.widget.BottomNavigationView
android:id="@+id/bottom_navigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="@color/colorPrimary"
android:elevation="8dp"
app:elevation="8dp"
app:itemIconTint="@drawable/bottom_nav_color_state"
app:itemTextColor="@drawable/bottom_nav_color_state"
app:menu="@menu/bottom_navigation_main"/>
vo...@gmail.com <vo...@gmail.com> #17
is the shadow and scrolling behavior has been added?
vi...@gmail.com <vi...@gmail.com> #18
wait for shadow and scrolling behavior...
ka...@gmail.com <ka...@gmail.com> #19
The target release was 25.0.1 and we're now at 26.0.0-beta2. Could you guys at least put an actual, realistic target on this issue?
po...@gmail.com <po...@gmail.com> #20
Scrolling behavior with CoordinatorLayout has been implemented, and should be available in the next release.
Passing bug to Avigail to comment about bottom nav elevation behavior.
Passing bug to Avigail to comment about bottom nav elevation behavior.
co...@gmail.com <co...@gmail.com> #21
I could not find any info about this, is this released ?
p....@gmail.com <p....@gmail.com> #22
Any news on when this will be released?
em...@gmail.com <em...@gmail.com> #23
I'm revisiting a project with this issue and this is still not fixed on v27.1.1. If I have a BottomNavigationView inside a parent CoordinatorLayout, it doesn't scroll. It works though perfectly when manually setting translationY:
appBarLayout.addOnOffsetChangedListener(new AppBarLayout.OnOffsetChangedListener() {
@Override
public void onOffsetChanged(AppBarLayout appBarLayout, int verticalOffset) {
bottomNavigationView.setTranslationY(verticalOffset*-1);
}
});
However, when trying the same technique, while having the BottomNavigationView inside a FrameLayout, which itself is the child of the parent CoordinatorLayout, the BottomNavigationView doesn't even show up in the UI.
Trying the same AppBarLayout OffsetChangedListener on a different UI component (such as a FAB), while inside the FrameLayout, works just as if the FAB was a direct child of the CoordinatorLayout.
So what's the difference between the 2 setups? Why does the FAB work, but not the BottomNavigationView?
Also, where's the scrolling behavior that was about to be released?
appBarLayout.addOnOffsetChangedListener(new AppBarLayout.OnOffsetChangedListener() {
@Override
public void onOffsetChanged(AppBarLayout appBarLayout, int verticalOffset) {
bottomNavigationView.setTranslationY(verticalOffset*-1);
}
});
However, when trying the same technique, while having the BottomNavigationView inside a FrameLayout, which itself is the child of the parent CoordinatorLayout, the BottomNavigationView doesn't even show up in the UI.
Trying the same AppBarLayout OffsetChangedListener on a different UI component (such as a FAB), while inside the FrameLayout, works just as if the FAB was a direct child of the CoordinatorLayout.
So what's the difference between the 2 setups? Why does the FAB work, but not the BottomNavigationView?
Also, where's the scrolling behavior that was about to be released?
[Deleted User] <[Deleted User]> #24
Scrolling behavior has been added. You can use it by setting a HideBottomViewOnScrollBehavior on the BottomNavigationView: app:layout_behavior="@string/hide_bottom_view_on_scroll_behavior".
See class documentation for BottomNavigationView:https://developer.android.com/reference/com/google/android/material/bottomnavigation/BottomNavigationView .
And for HideBottomViewOnScrollBehavior:https://developer.android.com/reference/com/google/android/material/behavior/HideBottomViewOnScrollBehavior .
This is available in our 28.0.0-alpha1 release or the 1.0.0-alpha1 release or later.
See class documentation for BottomNavigationView:
And for HideBottomViewOnScrollBehavior:
This is available in our 28.0.0-alpha1 release or the 1.0.0-alpha1 release or later.
ra...@gmail.com <ra...@gmail.com> #25
When the bottom bar is partly visible (eg user scrolled just a bit and stopped scrolling), does the bottom bar snaps automatically to either be fully visible or hidden like
a CollapsingToolbarLayout would do with app:layout_scrollFlags="scroll|snap" ?
a CollapsingToolbarLayout would do with app:layout_scrollFlags="scroll|snap" ?
ch...@google.com <ch...@google.com>
ch...@google.com <ch...@google.com>
ch...@google.com <ch...@google.com> #27
With this HideBottomViewOnScrollBehavior , Scrolling behavior working fine but, Showing white space occupying the size of that bottom view.
ps...@gmail.com <ps...@gmail.com> #29
si...@gmail.com <si...@gmail.com> #31
[Comment deleted]
da...@gotinder.com <da...@gotinder.com> #32
We are facing the same issue with using the android x equivalent libraries
androidx.recyclerview:recyclerview:1.0.0
com.google.android.material:material:1.0.0
androidx.constraintlayout:constraintlayout:2.0.0-alpha2
using com.google.android.material.appbar.AppBarLayout.
androidx.recyclerview.widget.RecyclerView,
androidx.coordinatorlayout.widget.CoordinatorLayout
So far I have found this is easily reproducible on the Samsung s8+ and Samsung s9+ following the same steps inhttps://issuetracker.google.com/issues/37051719#comment1
Added the workaround fix mentioned herehttps://issuetracker.google.com/issues/37051719#comment17 , it indeed fixes the issue with the app bar layout disappearing
androidx.recyclerview:recyclerview:1.0.0
com.google.android.material:material:1.0.0
androidx.constraintlayout:constraintlayout:2.0.0-alpha2
using com.google.android.material.appbar.AppBarLayout.
androidx.recyclerview.widget.RecyclerView,
androidx.coordinatorlayout.widget.CoordinatorLayout
So far I have found this is easily reproducible on the Samsung s8+ and Samsung s9+ following the same steps in
Added the workaround fix mentioned here
Description
Version used:
compile 'com.android.support:design:22.2.0'
compile 'com.android.support:recyclerview-v7:22.2.0'
When setting Toolbar with app:layout_scrollFlags="scroll|enterAlways" as a AppBarLayout only child. There are times where the 'quick return' did not show the Toolbar/AppBar. Displaying a white space.
Found a reproduceable way:
1) Have a Toolbar inside AppBar with app:layout_scrollFlags="scroll|enterAlways" and RecyclerView with app:layout_behavior="@string/appbar_scrolling_view_behavior" (refer XML below)
2) scroll the AppBar fully away to allow full viewing of RecyclerView
3) Press Home button in the Android NavigationBar
4) Return to the app via Recent App in Android NavigationBar
5) Notice the AppBar still maintains the hidden/scrolled away state
6) Scroll the list to make the AppBar 'quick return'
7) The AppBar is now empty
Note: background of Views has been set a color for demo purpose to identify components
<android.support.design.widget.CoordinatorLayout xmlns:android="
xmlns:app="
xmlns:tools="
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#3bd3cb"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar_actionbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?colorPrimary"
android:minHeight="?attr/actionBarSize"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
</android.support.design.widget.AppBarLayout>
<android.support.v7.widget.RecyclerView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#330000cc"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</android.support.design.widget.CoordinatorLayout>