Stuck with PanelState.DRAGGING after device rotation
Created by: lupsaa
Hello, recently I stumbled upon one issue with SlidingUpPanel.
I have the layout totally hidden by default and I open it from a floating action button using slidingUpLayout.setPanelState(PanelState.EXPANDED); Closing the layout is handled by the default drag action.
If by any chance the user is dragging the layout and a screen rotation is triggered, the layout will resume with its state equal to PanelState.DRAGGING.
This makes it impossible to open it again programmatically using setPanelState() as I've read through the method code because of: if (!isEnabled() || (!mFirstLayout && mSlideableView == null) || state == mSlideState || mSlideState == PanelState.DRAGGING) return;
A fix would be to disable storing PanelState as DRAGGING in onSaveInstanceState().
EDIT: I fixed this temporarilyextending the class and using reflection in onRestoreInstanceState()