|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.drismo.gui.quickaction.CustomPopupWindow
public class CustomPopupWindow
This class does most of the work of wrapping the PopupWindow
so it's simpler to use.
Edited by Lorensius. W. L. T
Field Summary | |
---|---|
protected android.view.View |
anchor
|
private android.graphics.drawable.Drawable |
background
|
private android.view.View |
root
|
protected android.widget.PopupWindow |
window
|
protected android.view.WindowManager |
windowManager
|
Constructor Summary | |
---|---|
CustomPopupWindow(android.view.View anchor)
Create a QuickAction |
Method Summary | |
---|---|
void |
dismiss()
|
protected void |
onCreate()
Anything you want to have happen when created. |
protected void |
onShow()
In case there is stuff to do right before displaying. |
protected void |
preShow()
|
void |
setBackgroundDrawable(android.graphics.drawable.Drawable background)
|
void |
setContentView(int layoutResID)
Will inflate and set the view from a resource id |
void |
setContentView(android.view.View root)
Sets the content view. |
void |
setOnDismissListener(android.widget.PopupWindow.OnDismissListener listener)
If you want to do anything when dismiss is called |
void |
showDropDown()
Displays like a popdown menu from the anchor view |
void |
showDropDown(int xOffset,
int yOffset)
Displays like a popdown menu from the anchor view. |
void |
showLikeQuickAction()
Displays like a QuickAction from the anchor view. |
void |
showLikeQuickAction(int xOffset,
int yOffset)
Displays like a QuickAction from the anchor view. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final android.view.View anchor
protected final android.widget.PopupWindow window
private android.view.View root
private android.graphics.drawable.Drawable background
protected final android.view.WindowManager windowManager
Constructor Detail |
---|
public CustomPopupWindow(android.view.View anchor)
anchor
- the view that the QuickAction will be displaying 'from'Method Detail |
---|
protected void onCreate()
protected void onShow()
protected void preShow()
public void setBackgroundDrawable(android.graphics.drawable.Drawable background)
public void setContentView(android.view.View root)
onCreate
root
- the view the popup will displaypublic void setContentView(int layoutResID)
layoutResID
- public void setOnDismissListener(android.widget.PopupWindow.OnDismissListener listener)
dismiss
is called
listener
- public void showDropDown()
public void showDropDown(int xOffset, int yOffset)
xOffset
- offset in X directionyOffset
- offset in Y directionpublic void showLikeQuickAction()
public void showLikeQuickAction(int xOffset, int yOffset)
xOffset
- offset in the X directionyOffset
- offset in the Y directionpublic void dismiss()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |