umano / AndroidSlidingUpPanel

This library provides a simple way to add a draggable sliding up panel (popularized by Google Music and Google Maps) to your Android application. Brought to you by Umano.
http://umano.me
Apache License 2.0
9.5k stars 2.26k forks source link

when i am dragging down the state will be changed to ANCHORED instead of COLLAPSED #700

Open nithinkrishnanp opened 8 years ago

pmk2429 commented 8 years ago

Had the same issue. I solved it by setting the anchor point of SlidinUpPanelLayout to 0.01f.

slidingUpPanelLayout.setAnchorPoint(0.01f);

Although, it did slowed down the action up animation but apart from that, it works fine for me.

dannysunyu commented 8 years ago

@pmk2429 No. It doesn't work for me.

dannysunyu commented 8 years ago

Comment out the ACTION_MOVE switch case in SlidingUpPanelLayout.onInterceptTouchEvent and there will be no anchor.

case MotionEvent.ACTION_MOVE: {
    if ((ady > dragSlop && adx > ady) || 
!isViewUnder(mDragView, (int) mInitialMotionX, (int) mInitialMotionY)) {
        mDragHelper.cancel();
        return false;
    }
    break;
}