public class XUIPopup extends XUIBasePopup
View 的任一方向旁边展示该浮层,支持自定义浮层出现/消失的动画。XUIBasePopup.RootView| Modifier and Type | Field and Description |
|---|---|
static int |
ANIM_AUTO |
static int |
ANIM_GROW_FROM_CENTER |
static int |
ANIM_GROW_FROM_LEFT |
static int |
ANIM_GROW_FROM_RIGHT |
static int |
DIRECTION_BOTTOM |
static int |
DIRECTION_NONE |
static int |
DIRECTION_TOP |
protected int |
mAnimStyle |
protected int |
mArrowCenter |
protected android.widget.ImageView |
mArrowDown |
protected android.widget.ImageView |
mArrowUp |
protected int |
mDirection |
protected int |
mX |
protected int |
mY |
mBackground, mRootView, mScreenSize, mWindowHeight, mWindowManager, mWindowWidth| Constructor and Description |
|---|
XUIPopup(android.content.Context context) |
XUIPopup(android.content.Context context,
int preferredDirection) |
| Modifier and Type | Method and Description |
|---|---|
android.view.ViewGroup.LayoutParams |
generateLayoutParam(int width,
int height) |
protected android.graphics.Point |
onShow(android.view.View attachedView) |
void |
setAnimStyle(int animStyle)
菜单弹出动画
|
void |
setContentView(android.view.View root)
Set content view.
|
void |
setPopupLeftRightMinMargin(int popupLeftRightMinMargin) |
void |
setPopupTopBottomMinMargin(int popupTopBottomMinMargin) |
XUIPopup |
setPositionOffsetX(int offsetX)
设置根据计算得到的位置后的偏移值
|
XUIPopup |
setPositionOffsetYWhenBottom(int offsetYWhenBottom)
设置根据计算得到的位置后的偏移值
|
XUIPopup |
setPositionOffsetYWhenTop(int offsetYWhenTop)
设置根据计算得到的位置后的偏移值
|
XUIPopup |
setPreferredDirection(int preferredDirection)
设置弹出的方向
|
dismiss, getContext, getPopupWindow, isShowing, onConfigurationChanged, onDismiss, onPreShow, setBackgroundDrawable, setContentView, setNeedCacheSize, setOnDismissListener, show, showpublic static final int ANIM_GROW_FROM_LEFT
public static final int ANIM_GROW_FROM_RIGHT
public static final int ANIM_GROW_FROM_CENTER
public static final int ANIM_AUTO
public static final int DIRECTION_TOP
public static final int DIRECTION_BOTTOM
public static final int DIRECTION_NONE
protected android.widget.ImageView mArrowUp
protected android.widget.ImageView mArrowDown
protected int mAnimStyle
protected int mDirection
protected int mX
protected int mY
protected int mArrowCenter
public XUIPopup(android.content.Context context)
public XUIPopup(android.content.Context context,
int preferredDirection)
public void setPopupLeftRightMinMargin(int popupLeftRightMinMargin)
public void setPopupTopBottomMinMargin(int popupTopBottomMinMargin)
public XUIPopup setPositionOffsetX(int offsetX)
public XUIPopup setPositionOffsetYWhenTop(int offsetYWhenTop)
offsetYWhenTop - mDirection!=DIRECTION_BOTTOM 时的 offsetYpublic XUIPopup setPositionOffsetYWhenBottom(int offsetYWhenBottom)
offsetYWhenBottom - mDirection==DIRECTION_BOTTOM 时的 offsetYpublic XUIPopup setPreferredDirection(int preferredDirection)
preferredDirection - protected android.graphics.Point onShow(android.view.View attachedView)
onShow in class XUIBasePopuppublic void setAnimStyle(int animStyle)
animStyle - 默认是 ANIM_AUTOpublic void setContentView(android.view.View root)
XUIBasePopupsetContentView in class XUIBasePopuproot - Root viewpublic android.view.ViewGroup.LayoutParams generateLayoutParam(int width,
int height)