Fixed
Status Update
Comments
au...@google.com <au...@google.com>
al...@android.com <al...@android.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.
Description
Version info:
buildTools - 25.0.0
compile/targetSDK - 25
appCompat/design support lib: 25.0.0
10-20 11:26:45.523 4417-4417/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: atownsend.sampleproject, PID: 4417
java.lang.RuntimeException: Unable to start activity ComponentInfo{atownsend.sampleproject/atownsend.sampleproject.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.support.v7.view.menu.MenuBuilder.size()' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2646)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.support.v7.view.menu.MenuBuilder.size()' on a null object reference
at android.support.design.internal.BottomNavigationMenuView.buildMenuView(BottomNavigationMenuView.java:231)
at android.support.design.internal.BottomNavigationPresenter.updateMenuView(BottomNavigationPresenter.java:59)
at android.support.v7.view.menu.MenuBuilder.dispatchPresenterUpdate(MenuBuilder.java:290)
at android.support.v7.view.menu.MenuBuilder.onItemsChanged(MenuBuilder.java:1042)
at android.support.v7.view.menu.MenuBuilder.addInternal(MenuBuilder.java:450)
at android.support.design.internal.BottomNavigationMenu.addInternal(BottomNavigationMenu.java:50)
at android.support.v7.view.menu.MenuBuilder.add(MenuBuilder.java:473)
at atownsend.sampleproject.MainActivity.onCreate(MainActivity.java:16)
at android.app.Activity.performCreate(Activity.java:6664)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2599)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)