Panel not expanding while user is touching the screen.
Created by: mtyy
I want to be 100% sure that panel slides to EXPANDED state no matter what. However when user is in middle of a listview/viewpager scroll and possibly other touch interactions, the panel does not appear.
this is basically what happens:
onPanelStateChanged() called with: previousState = [COLLAPSED], newState = [DRAGGING]
onPanelSlide() called with: slideOffset = [1.0]
onPanelStateChanged() called with: previousState = [DRAGGING], newState = [COLLAPSED]
starts dragging and collapses instantly.
I can work around this with disabling touch events. By overriding dispatchTouchEvent(MotionEvent ev)
to return true (without calling super) before setting setPanelState(Panelstate.EXPANDED)
and until onPanelStateChanged()
newState is EXPANDED.
however this seems super hacky and unreliable. Maybe you guys have more ideas how to tackle it?