Created by 大灯泡 on 2017/12/12. PopupHelper,这货与Popup强引用哦~
| 55 | * PopupHelper,这货与Popup强引用哦~ |
| 56 | */ |
| 57 | @SuppressWarnings("all") |
| 58 | final class BasePopupHelper implements KeyboardUtils.OnKeyboardChangeListener, BasePopupFlag, ClearMemoryObject { |
| 59 | |
| 60 | BasePopupWindow mPopupWindow; |
| 61 | |
| 62 | WeakHashMap<Object, BasePopupEvent.EventObserver> eventObserverMap; |
| 63 | |
| 64 | Map<Integer, Boolean> mFlagCacheMap; |
| 65 | |
| 66 | Runnable pendingDismissRunnable; |
| 67 | |
| 68 | boolean enablePendingDismiss; |
| 69 | |
| 70 | enum ShowMode { |
| 71 | RELATIVE_TO_ANCHOR, |
| 72 | SCREEN, |
| 73 | POSITION |
| 74 | } |
| 75 | |
| 76 | static final long DEFAULT_KEYBOARD_SHOW_DELAY = 350; |
| 77 | static final int DEFAULT_OVERLAY_STATUS_BAR_MODE = OVERLAY_MASK | OVERLAY_CONTENT; |
| 78 | static final int DEFAULT_OVERLAY_NAVIGATION_BAR_MODE = OVERLAY_MASK; |
| 79 | private static final int CONTENT_VIEW_ID = R.id.base_popup_content_root; |
| 80 | |
| 81 | static final int STATUS_START_SHOWING = 0x1; |
| 82 | static final int STATUS_START_DISMISS = 0x2; |
| 83 | int showFlag = 0; |
| 84 | BasePopupWindow.Priority priority = BasePopupWindow.Priority.NORMAL; |
| 85 | |
| 86 | ShowMode mShowMode = ShowMode.SCREEN; |
| 87 | |
| 88 | int contentRootId = CONTENT_VIEW_ID; |
| 89 | |
| 90 | int flag = IDLE; |
| 91 | |
| 92 | //animate |
| 93 | Animation mShowAnimation; |
| 94 | Animator mShowAnimator; |
| 95 | Animation mDismissAnimation; |
| 96 | Animator mDismissAnimator; |
| 97 | boolean preventInitShowAnimation; |
| 98 | boolean preventInitDismissAnimation; |
| 99 | |
| 100 | Animation mMaskViewShowAnimation; |
| 101 | Animation mMaskViewDismissAnimation; |
| 102 | |
| 103 | boolean isDefaultMaskViewShowAnimation; |
| 104 | boolean isDefaultMaskViewDismissAnimation; |
| 105 | boolean overlayMask = false; |
| 106 | |
| 107 | long showDuration; |
| 108 | long dismissDuration; |
| 109 | long showKeybaordDelay = DEFAULT_KEYBOARD_SHOW_DELAY; |
| 110 | |
| 111 | int animationStyleRes; |
| 112 | |
| 113 | //callback |
| 114 | BasePopupWindow.OnDismissListener mOnDismissListener; |
nothing calls this directly
no outgoing calls
no test coverage detected