Fixed
Status Update
Comments
al...@android.com <al...@android.com>
we...@gmail.com <we...@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.
we...@gmail.com <we...@gmail.com> #4
I'm having the same issue. There is an estimation when this issue will be fixed?
ya...@google.com <ya...@google.com> #5
This has been released in support library 25.0.1.
ya...@google.com <ya...@google.com> #6
Scroll behavior is still missing. For those that are looking for one, sample project archive contains it.
ya...@google.com <ya...@google.com>
fr...@gmail.com <fr...@gmail.com> #7
Elevation part was fixed. Still working on the behavior.
gk...@gmail.com <gk...@gmail.com> #8
Elevation is broken if you use app:itemBackground rather than android:background since it's setting the elevation on itself rather than mMenuView. Why is itemBackground exposed? Should I not just use android:background?
al...@android.com <al...@android.com> #9
[Comment deleted]
so...@gmail.com <so...@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.
la...@gmail.com <la...@gmail.com> #11
app:itemBackground is meant to be used for adding ripples/pressed state. By default it just has a round ripple. To set the background color for you should use android:background, once you do so you will see the shadow on API 21+ above BottomNavigationView (just using elevation) and for pre API 21 we add a simple 1dp divider to separate it from the background as elevation does not exist in these platforms.
Am I missing something?
Am I missing something?
ya...@google.com <ya...@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.
st...@gmail.com <st...@gmail.com> #13
I was just confused by what app:itemBackground was for, but that makes sense. thanks!
[Deleted User] <[Deleted User]> #14
When is the scrolling behavior planned to be released?
[Deleted User] <[Deleted User]> #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" />
ag...@gmail.com <ag...@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"/>
th...@gmail.com <th...@gmail.com> #17
is the shadow and scrolling behavior has been added?
Description
Version used: 23.2.0
Theme used: Default
Devices/Android versions reproduced on:
Nexus 5X Emulator Android 6.0
Genymotion Nexus 5X Emulator Android 6.0
Samsung Note 4 Android 5.0
I am having an issue with my bottom sheet. I have set the app:behavior_peekHeight in my layout and when my activity starts, the bottom sheet starts at a different (smaller) peek height. When I drag the bottom sheet open and closed, it will go to the peek height that I set it at in the layout.
Can be seen in action here:
Project is located here: