null
BasePopupWindow.onCreateAnimateView()返回为空,则返回contentView(BasePopup.onCreateContentView())BasePopupWindow.isOutSideTouchable()PopupWindow.setOnDismissListener(OnDismissListener)
那么dismiss之前将会回调到本方法,在这里您可以进一步决定是否可以继续取消PopupWindow
BasePopupWindow.setOnBeforeShowCallback(OnBeforeShowCallback)
那么show之前将会回调到本方法,在这里您可以进一步决定是否可以展示PopupWindow
BasePopupWindow.onCreateShowAnimation()/BasePopupWindow.onCreateShowAnimator())
null
BasePopupWindow.createPopupById(int),该方法支持读取View的xml布局参数,否则可能会出现与布局不一样的展示从而必须手动传入宽高等参数null
PopupWindow.dismiss()
本类提供一些简单的动画方法:
BasePopupWindow.getDefaultAlphaAnimation(boolean) ()}:得到一个默认进入的渐变动画
BasePopupWindow.getDefaultScaleAnimation(boolean) ()}:得到一个默认的放大缩小动画
BasePopupWindow.getTranslateVerticalAnimation(float, float, int) ()}:快速获取垂直方向的动画
如果需要用到属性动画,请覆写BasePopupWindow.onCreateDismissAnimator() ()}Animator),可以返回为 null
BasePopupWindow.onCreateDismissAnimation() ()}
null
本类提供一些简单的动画方法:
BasePopupWindow.getDefaultAlphaAnimation():得到一个默认进入的渐变动画
BasePopupWindow.getDefaultScaleAnimation():得到一个默认的放大缩小动画
BasePopupWindow.getTranslateVerticalAnimation(float, float, int) ()}:快速获取垂直方向的动画
如果需要用到属性动画,请覆写BasePopupWindow.onCreateShowAnimator()Animator),可以返回为 null
BasePopupWindow.onCreateShowAnimation()
PopupWindow.setOnDismissListener(OnDismissListener)
如果有退出动画,则在退出动画播放的时候会回调该方法
BasePopupWindow.showPopupWindow()、BasePopupWindow.showPopupWindow(View)、BasePopupWindow.showPopupWindow(int)时,会回调该方法,允许用户拦截BasePopup的show过程,否则按照默认程序进行Gravity中的值
BasePopupWindow.setOutSideDismiss(boolean) insteadBasePopupWindow.setOutSideTouchable(boolean) insteadBasePopupWindow.setClipToScreen(boolean)
EditText
BasePopupWindow.setAutoLocatePopup(boolean)失效BasePopupWindow.onCreateDismissAnimation()
BasePopupWindow.onCreateDismissAnimator()
BasePopupWindow.setClipToScreen(boolean)为true的情况下,BasePopup会针对剩余高度来调整Popup的大小,因此可能出现实际显示高度过小的情况
该方法可以保持默认测量高度从而阻止BasePopup的自动调整BasePopupWindow.OnBeforeShowCallback监听之后,在您调用{
BasePopupWindow.showPopupWindow()
BasePopupWindow.showPopupWindow(int)
BasePopupWindow.showPopupWindow(View)
}
BasePopupWindow.onCreateDismissAnimation() or BasePopupWindow.onCreateShowAnimator()
Gravity
BasePopupWindow.showPopupWindow()
如果跟anchorView联系,gravity意味着以anchorView为中心的方位BasePopupWindow.showPopupWindow(View)
Gravity
BasePopupWindow.showPopupWindow()
如果跟anchorView联系,gravity意味着以anchorView为中心的方位BasePopupWindow.showPopupWindow(View)
BasePopupWindow.onCreateShowAnimation()
BasePopupWindow.onCreateShowAnimator()
BasePopupWindow.showPopupWindow(View)