private Animation getEnterAnimation() {
        Animation enterAnim;
        if (enterAnimResId == R.anim.anim_dialogx_default_enter &&
                exitAnimResId == R.anim.anim_dialogx_default_exit &&
                baseView() == null) {
            switch (align) {
                case TOP:
                case TOP_CENTER:
                case TOP_LEFT:
                case TOP_RIGHT:
                    enterAnimResId = R.anim.anim_dialogx_top_enter;
                    exitAnimResId = R.anim.anim_dialogx_top_exit;
                    break;
                case BOTTOM:
                case BOTTOM_CENTER:
                case BOTTOM_LEFT:
                case BOTTOM_RIGHT:
                    enterAnimResId = R.anim.anim_dialogx_bottom_enter;
                    exitAnimResId = R.anim.anim_dialogx_bottom_exit;
                    break;
                case LEFT:
                case LEFT_CENTER:
                case LEFT_TOP:
                case LEFT_BOTTOM:
                    enterAnimResId = R.anim.anim_dialogx_left_enter;
                    exitAnimResId = R.anim.anim_dialogx_left_exit;
                    break;
                case RIGHT:
                case RIGHT_CENTER:
                case RIGHT_TOP:
                case RIGHT_BOTTOM:
                    enterAnimResId = R.anim.anim_dialogx_right_enter;
                    exitAnimResId = R.anim.anim_dialogx_right_exit;
                    break;
            }
            enterAnim = AnimationUtils.loadAnimation(getOwnActivity(), enterAnimResId);
            enterAnim.setInterpolator(new DecelerateInterpolator(2f));
        } else {
            int enterAnimResIdTemp = R.anim.anim_dialogx_default_enter;
            if (overrideEnterAnimRes != 0) {
                enterAnimResIdTemp = overrideEnterAnimRes;
            }
            if (enterAnimResId != 0) {
                enterAnimResIdTemp = enterAnimResId;
            }
            enterAnim = AnimationUtils.loadAnimation(getOwnActivity(), enterAnimResIdTemp);
        }
        long enterAnimDurationTemp = enterAnim.getDuration();
        if (overrideEnterDuration >= 0) {
            enterAnimDurationTemp = overrideEnterDuration;
        }
        if (enterAnimDuration >= 0) {
            enterAnimDurationTemp = enterAnimDuration;
        }
        enterAnim.setDuration(enterAnimDurationTemp);
        return enterAnim;
    }
@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/CustomDialog.java