@Override
                    public boolean onTouch(View v, MotionEvent event) {
                        switch (event.getAction()) {
                            case MotionEvent.ACTION_DOWN:
                                touchDown = true;
                                touchY = event.getY();
                                break;
                            case MotionEvent.ACTION_MOVE:
                                if (touchDown) {
                                    float deltaY = event.getY() - touchY;
                                    if (boxBody.getY() + deltaY < defaultTop) {
                                        boxBody.setY(boxBody.getY() + deltaY);
                                    } else {
                                        boxBody.setY(defaultTop);
                                    }
                                }
                                break;
                            case MotionEvent.ACTION_CANCEL:
                            case MotionEvent.ACTION_UP:
                                if (boxBody.getY() < defaultTop - DialogX.touchSlideTriggerThreshold) {
                                    doDismiss(v);
                                } else {
                                    PopValueAnimator valueAnimator = PopValueAnimator.ofFloat(boxBody.getY(), defaultTop);
                                    boxBody.setTag(valueAnimator);
                                    valueAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
                                        @Override
                                        public void onAnimationUpdate(ValueAnimator animation) {
                                            if (getDialogImpl() == null || !isShow) {
                                                animation.cancel();
                                                return;
                                            }
                                            View bodyView = getDialogImpl().boxBody;
                                            if (bodyView != null && bodyView.isAttachedToWindow()) {
                                                bodyView.setY((Float) animation.getAnimatedValue());
                                            }
                                        }
                                    });
                                    valueAnimator.setDuration(enterAnimDuration == -1 ? 300 : enterAnimDuration).setInterpolator(new DecelerateInterpolator(2f));
                                    valueAnimator.start();

                                    if (Math.abs(boxBody.getY() - defaultTop) <= 1 && event.getY() <= touchY) {
                                        boxBody.callOnClick();
                                    }
                                }
                                break;
                        }
                        return true;
                    }
@author: Kongzue
@github: https://github.com/kongzue/
@homepage: http://kongzue.com/
@mail: myzcxhh@live.cn
@createTime: 2020/10/20 11:59
DialogX/src/main/java/com/kongzue/dialogx/dialogs/PopNotification.java