Closed dengyibin closed 6 years ago
i got it in demo hover/hoverdemo-kitchensink/src/main/java/io/mattcarroll/hover/hoverdemo/kitchensink/DemoHoverMenuActivity.java
@dengyibin I was able to reproduce your issue and I believe I have fixed it. The fix will be available in the next release.
The root cause was this: When a Hover menu is expanded, it adds OnClickListeners to each tab. Those OnClickListeners were not being removed when the Hover menu collapses itself. I added code to remove those listeners.
Please re-open this issue if the problem persists after the next release.
09-04 15:32:42.129 8157-8157/io.mattcarroll.hover.hoverdemo E/AndroidRuntime: FATAL EXCEPTION: main Process: io.mattcarroll.hover.hoverdemo, PID: 8157 java.lang.NullPointerException: Attempt to read from field 'io.mattcarroll.hover.HoverMenu$SectionId io.mattcarroll.hover.HoverView.mSelectedSectionId' on a null object reference at io.mattcarroll.hover.HoverViewStateExpanded.onTabSelected(HoverViewStateExpanded.java:516) at io.mattcarroll.hover.HoverViewStateExpanded.access$300(HoverViewStateExpanded.java:39) at io.mattcarroll.hover.HoverViewStateExpanded$2.onClick(HoverViewStateExpanded.java:152) at android.view.View.performClick(View.java:4909) at android.view.View$PerformClick.run(View.java:20390) 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:5869) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1020) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:815)