public abstract class XUIBasePopup
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
class |
XUIBasePopup.RootView |
| Modifier and Type | Field and Description |
|---|---|
protected android.graphics.drawable.Drawable |
mBackground |
protected android.view.View |
mRootView |
protected android.graphics.Point |
mScreenSize |
protected int |
mWindowHeight |
protected android.view.WindowManager |
mWindowManager |
protected int |
mWindowWidth |
| Constructor and Description |
|---|
XUIBasePopup(android.content.Context context)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
dismiss() |
android.content.Context |
getContext() |
android.widget.PopupWindow |
getPopupWindow() |
boolean |
isShowing() |
protected void |
onConfigurationChanged(android.content.res.Configuration newConfig) |
protected void |
onDismiss()
On dismiss
|
protected void |
onPreShow()
On PreShow
|
protected abstract android.graphics.Point |
onShow(android.view.View attachedView) |
void |
setBackgroundDrawable(android.graphics.drawable.Drawable background)
Set background drawable.
|
void |
setContentView(int layoutResID)
Set content view.
|
void |
setContentView(android.view.View root)
Set content view.
|
void |
setNeedCacheSize(boolean needCacheSize) |
XUIBasePopup |
setOnDismissListener(android.widget.PopupWindow.OnDismissListener listener)
设置消失的监听
|
void |
show(android.view.View view) |
void |
show(android.view.View parent,
android.view.View anchorView) |
protected android.view.View mRootView
protected android.graphics.drawable.Drawable mBackground
protected android.view.WindowManager mWindowManager
protected android.graphics.Point mScreenSize
protected int mWindowHeight
protected int mWindowWidth
public XUIBasePopup(android.content.Context context)
context - Contextprotected void onDismiss()
protected void onPreShow()
public final void show(android.view.View view)
public final void show(android.view.View parent,
android.view.View anchorView)
parent - a parent view to get the View.getWindowToken() token fromanchorView - protected abstract android.graphics.Point onShow(android.view.View attachedView)
public boolean isShowing()
public void setBackgroundDrawable(android.graphics.drawable.Drawable background)
background - Background drawablepublic void setContentView(android.view.View root)
root - Root viewpublic void setContentView(int layoutResID)
layoutResID - Resource idpublic XUIBasePopup setOnDismissListener(android.widget.PopupWindow.OnDismissListener listener)
listener - public void dismiss()
protected void onConfigurationChanged(android.content.res.Configuration newConfig)
public void setNeedCacheSize(boolean needCacheSize)
public android.content.Context getContext()
public android.widget.PopupWindow getPopupWindow()