public PopNotification show() {
        if (isHide && getDialogView() != null) {
            getDialogView().setVisibility(View.VISIBLE);
            return this;
        }
        super.beforeShow();
        if (getDialogView() == null) {
            if (DialogX.onlyOnePopNotification) {
                if (popNotificationList != null && !popNotificationList.isEmpty()) {
                    popNotificationList.get(popNotificationList.size() - 1).dismiss();
                }
            } else {
                if (popNotificationList != null) {
                    CopyOnWriteArrayList<PopNotification> popNotificationCopyOnWriteArrayList = new CopyOnWriteArrayList<>(popNotificationList);
                    for (int i = 0; i < popNotificationCopyOnWriteArrayList.size(); i++) {
                        PopNotification popInstance = popNotificationCopyOnWriteArrayList.get(i);
                        if (popNotificationCopyOnWriteArrayList.size() >= maxShowCount) {
                            if (i <= popNotificationCopyOnWriteArrayList.size() - maxShowCount) {
                                popInstance.dismiss();
                                popNotificationList.remove(popInstance);
                            }
                        }
                    }
                }
            }
            if (popNotificationList == null) popNotificationList = new ArrayList<>();
            popNotificationList.add(PopNotification.this);
            int layoutResId = isLightTheme() ? R.layout.layout_dialogx_popnotification_material : R.layout.layout_dialogx_popnotification_material_dark;
            if (style.popNotificationSettings() != null) {
                if (style.popNotificationSettings().layout(isLightTheme()) != 0) {
                    layoutResId = style.popNotificationSettings().layout(isLightTheme());
                }
                align = style.popNotificationSettings().align();
                if (align == null) align = DialogXStyle.PopNotificationSettings.ALIGN.TOP;
                int styleEnterAnimResId = style.popNotificationSettings().enterAnimResId(isLightTheme());
                int styleExitAnimResId = style.popNotificationSettings().exitAnimResId(isLightTheme());
                enterAnimResId = enterAnimResId == 0 ? (
                        overrideEnterAnimRes == 0 ? (styleEnterAnimResId != 0 ? styleEnterAnimResId : R.anim.anim_dialogx_notification_enter) : overrideEnterAnimRes
                ) : enterAnimResId;
                exitAnimResId = exitAnimResId == 0 ? (
                        overrideExitAnimRes == 0 ? (styleExitAnimResId != 0 ? styleExitAnimResId : R.anim.anim_dialogx_notification_exit) : overrideExitAnimRes
                ) : exitAnimResId;
                enterAnimDuration = enterAnimDuration == -1 ? (
                        overrideEnterDuration
                ) : enterAnimDuration;
                exitAnimDuration = exitAnimDuration == -1 ? (
                        overrideExitDuration
                ) : exitAnimDuration;
            }
            View dialogView = createView(layoutResId);
            dialogImpl = new DialogImpl(dialogView);
            if (dialogView != null) dialogView.setTag(me);
            show(dialogView);
        } else {
            show(getDialogView());
        }
        return this;
    }
@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