Status Update
Comments
[Deleted User] <[Deleted User]> #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.
al...@android.com <al...@android.com>
au...@google.com <au...@google.com> #4
I'm having the same issue. There is an estimation when this issue will be fixed?
[Deleted User] <[Deleted User]> #5
This has been released in support library 25.0.1.
au...@google.com <au...@google.com> #6
Scroll behavior is still missing. For those that are looking for one, sample project archive contains it.
[Deleted User] <[Deleted User]> #7
Elevation part was fixed. Still working on the behavior.
au...@google.com <au...@google.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?
[Deleted User] <[Deleted User]> #9
[Comment deleted]
[Deleted User] <[Deleted User]> #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.
al...@android.com <al...@android.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?
Description
- Samsung gt_i9060i Android 4,4,4
- Samsung SM-G530H Android 4.4.4
- Samsung sm_g361h Android 5.1.1
- Samsung SM-J200F Android 5.1.1
- Samsung sm_g530h
- Condor pgn513 Android 5.1
Fatal Exception: java.lang.ArrayIndexOutOfBoundsException: length=1; index=1
at android.support.v4.widget.ViewDragHelper.saveLastMotion(ViewDragHelper.java:849)
at android.support.v4.widget.ViewDragHelper.shouldInterceptTouchEvent(ViewDragHelper.java:1057)
at android.support.v4.widget.DrawerLayout.onInterceptTouchEvent(DrawerLayout.java:1434)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1996)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2519)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2171)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2519)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2171)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2519)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2171)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2519)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2171)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2519)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2171)
at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2485)
at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1801)
at android.app.Activity.dispatchTouchEvent(Activity.java:2797)
at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:60)
at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:60)
at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2446)
at android.view.View.dispatchPointerEvent(View.java:8806)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4662)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4520)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4034)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4087)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4053)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4190)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4061)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4247)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4034)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4087)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4053)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4061)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4034)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:6463)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:6437)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:6390)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:6622)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185)
at android.view.InputEventReceiver.nativeConsumeBatchedInputEvents(InputEventReceiver.java)
at android.view.InputEventReceiver.consumeBatchedInputEvents(InputEventReceiver.java:176)
at android.view.ViewRootImpl.doConsumeBatchedInput(ViewRootImpl.java:6581)
at android.view.ViewRootImpl$ConsumeBatchedInputRunnable.run(ViewRootImpl.java:6648)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:800)
at android.view.Choreographer.doCallbacks(Choreographer.java:603)
at android.view.Choreographer.doFrame(Choreographer.java:570)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:786)
at android.os.Handler.handleCallback(Handler.java:815)
at android.os.Handler.dispatchMessage(Handler.java:104)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5631)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:959)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:754)