Package 

Class BaseWindow

  • All Implemented Interfaces:
    android.widget.PopupWindow.OnDismissListener , androidx.lifecycle.LifecycleObserver , com.liecoder.framework.base.IBaseWindowService

    
    public abstract class BaseWindow<VB extends ViewBinding>
    extends BasePopupWindow implements IBaseWindowService
                        

    基础PopupWindow类,提供通用的PopupWindow视图和行为实现。

    此类继承自 BasePopupWindow 并实现了 IBaseWindowService 接口,用于创建和管理弹出PopupWindow。 它使用泛型 VB 来指定具体的 ViewBinding 类型,确保类型安全和编译时检查。

    • Constructor Summary

      Constructors 
      Constructor Description
      BaseWindow(Context context)
    • Method Summary

      Modifier and Type Method Description
      Unit show(View anchorView) 显示PopupWindow的方法。在显示PopupWindow之前,更新视图内容,并调用父类的 showPopupWindow 方法来显示PopupWindow。
      • Methods inherited from class com.liecoder.framework.base.BaseWindow

        bindLifecycleOwner, computeGravity, createPopupById, dipToPx, dismiss, dismiss, dismissAnimation, dispatchOutSideEvent, findViewById, getContentView, getContext, getContextInner, getDismissAnimation, getDismissAnimator, getDisplayAnimateView, getHeight, getMaskOffsetX, getMaskOffsetY, getOffsetX, getOffsetY, getOnBeforeShowCallback, getOnDismissListener, getPopupBackground, getPopupGravity, getPopupWindow, getPreMeasureHeight, getPreMeasureWidth, getShowAnimation, getShowAnimator, getWidth, gravity, hideKeyboardOnDismiss, hideKeyboardOnShow, initView, initView, isAllowDismissWhenTouchOutside, isAutoMirror, isOutSideTouchable, isPopupFadeEnable, isShowing, isTouchable, linkTo, onAnchorBottom, onAnchorTop, onBackPressed, onBeforeDismiss, onBeforeDismissInternal, onBeforeShow, onCreateAnimateView, onCreateDismissAnimation, onCreateDismissAnimator, onCreateDismissAnimator, onCreateShowAnimation, onCreateShowAnimator, onCreateShowAnimator, onDestroy, onDismiss, onDispatchKeyEvent, onGenericMotionEvent, onInterceptTouchEvent, onLogInternal, onOutSideTouch, onPopupLayout, onShowError, onShowing, onSizeChange, onTouchEvent, onViewCreated, onWindowFocusChanged, preMeasure, setAlignBackground, setAlignBackgroundGravity, setAutoMirrorEnable, setAutoShowKeyboard, setAutoShowKeyboard, setBackPressEnable, setBackground, setBackground, setBackgroundColor, setBackgroundView, setBlurBackgroundEnable, setBlurBackgroundEnable, setBlurOption, setClipChildren, setContentView, setContentView, setDismissAnimation, setDismissAnimator, setFitSize, setHeight, setHeightAsAnchorView, setKeyEventListener, setKeyboardAdaptionMode, setKeyboardAdaptionMode, setKeyboardAdaptionMode, setKeyboardAdaptive, setKeyboardGravity, setKeyboardOffsetX, setKeyboardOffsetY, setLayoutDirection, setMaskOffsetX, setMaskOffsetY, setMaskViewDismissAnimation, setMaskViewShowAnimation, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setOffsetX, setOffsetY, setOnBeforeShowCallback, setOnDismissListener, setOnKeyboardChangeListener, setOnPopupWindowShowListener, setOutSideDismiss, setOutSideTouchable, setOverlayMask, setOverlayNavigationBar, setOverlayNavigationBarMode, setOverlayStatusbar, setOverlayStatusbarMode, setPopupAnimationStyle, setPopupFadeEnable, setPopupGravity, setPopupGravity, setPopupGravityMode, setPopupGravityMode, setPriority, setShowAnimation, setShowAnimator, setShowKeyboardDelay, setTouchable, setViewClickListener, setWidth, setWidthAsAnchorView, showAnimation, showPopupWindow, showPopupWindow, showPopupWindow, superDismiss, syncMaskAnimationDuration, tryToShowPopup, update, update, update, update, update, updateKeyboardAlign, updateView, waitForFirstActivityOpened
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BaseWindow

        BaseWindow(Context context)
        Parameters:
        context - 用于创建PopupWindow的上下文。
    • Method Detail

      • show

         Unit show(View anchorView)

        显示PopupWindow的方法。

        在显示PopupWindow之前,更新视图内容,并调用父类的 showPopupWindow 方法来显示PopupWindow。

        Parameters:
        anchorView - PopupWindow附着的视图,用于定位PopupWindow。