Status Update
Comments
sl...@gmail.com <sl...@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.
ch...@google.com <ch...@google.com> #4
I'm having the same issue. There is an estimation when this issue will be fixed?
sl...@gmail.com <sl...@gmail.com> #5
This has been released in support library 25.0.1.
ch...@google.com <ch...@google.com> #6
Scroll behavior is still missing. For those that are looking for one, sample project archive contains it.
mr...@gmail.com <mr...@gmail.com> #9
[Comment deleted]
ma...@gmail.com <ma...@gmail.com> #10
Set transparent color for app:itemBackground and use solid color on the BottomNavigationView background. That would be the only way to see the elevation, otherwise the top most parent (BNV) will not draw the elevation onto which you are applying elevation, since it doesnt have solid background.
If android:background is used on < 21, shadow is overlaid over the background. Elevation does not cast upward shadow, does it? So the method addCompatibilityTopDivider() in current 25.0.1 should be available for all versions.
If android:background is used on < 21, shadow is overlaid over the background. Elevation does not cast upward shadow, does it? So the method addCompatibilityTopDivider() in current 25.0.1 should be available for all versions.
ar...@gmail.com <ar...@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?
cr...@gmail.com <cr...@gmail.com> #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"/>
te...@pokesoftworks.com <te...@pokesoftworks.com> #17
is the shadow and scrolling behavior has been added?
su...@gmail.com <su...@gmail.com> #18
wait for shadow and scrolling behavior...
ni...@gmail.com <ni...@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?
ca...@gmail.com <ca...@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.
al...@gmail.com <al...@gmail.com> #21
I could not find any info about this, is this released ?
im...@gmail.com <im...@gmail.com> #22
Any news on when this will be released?
kh...@gmail.com <kh...@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?
ml...@gmail.com <ml...@gmail.com> #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.
lu...@gmail.com <lu...@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" ?
he...@gmail.com <he...@gmail.com> #26
Im on 28.0.0 and the bottom shadow still doesnt show up at the top when i set the app:elevation in BNV.
is it yet to be fixed ? Here is my layout
<android.support.design.widget.BottomNavigationView
android:id="@+id/landing_bottom_nav"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="@color/white"
app:elevation="4dp"
android:elevation="4dp"
app:layout_constraintBottom_toBottomOf="parent"
app:menu="@menu/landing_menu"/>
is it yet to be fixed ? Here is my layout
<android.support.design.widget.BottomNavigationView
android:id="@+id/landing_bottom_nav"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="@color/white"
app:elevation="4dp"
android:elevation="4dp"
app:layout_constraintBottom_toBottomOf="parent"
app:menu="@menu/landing_menu"/>
al...@gmail.com <al...@gmail.com> #27
With this HideBottomViewOnScrollBehavior , Scrolling behavior working fine but, Showing white space occupying the size of that bottom view.
[Deleted User] <[Deleted User]> #28
@srinivasmakkena058 Could you please provide a video showing the scrolling whitespace issue? And could you file a separate issue, since the scroll behavior doesn't appear to be missing, which is the issue described in the title of this bug?
@pujos.michael Please file a separate bug about elevation concerns. I looked into bottom navigation elevation a couple years back, and I believe it's actually sort of WAI that the shadow hardly shows -- the light source is at the top of the screen which would make the shadow show at the bottom of the bar. Happy to discuss and address in a separate issue, but let's keep this one focused on scroll behavior.
ma...@gmail.com <ma...@gmail.com> #29
the crash related to style=“@style/Widget.AppCompat.Button.Colored” happens with both 23.2 and 23.1.1 versions.
Thanks to #21 for the great workaround, I managed to get my button working with 23.1.1 at least.
The solution is really clear, try it:
http://stackoverflow.com/a/27505229/2512380
Thanks to #21 for the great workaround, I managed to get my button working with 23.1.1 at least.
The solution is really clear, try it:
sl...@gmail.com <sl...@gmail.com> #30
Thank you, everyting is working as expected :)
Description
Version used: 23.2.0
Theme used: Theme.AppCompat.Light.NoActionBar
Devices/Android versions reproduced on: Samsung Galaxy Tab 2 (GT P5210) / KitKat 4.4.2
Add a spinner to any activity anywhere in the layout xml file:
<Spinner
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
App crashes with exception:
android.content.res.Resources$NotFoundException: File res/drawable/abc_spinner_textfield_background_material.xml from drawable resource ID #0x7f020040