OsmAnd
|
Public Member Functions | |
CustomPopupWindow (View anchor) | |
void | setBackgroundDrawable (Drawable background) |
void | setContentView (View root) |
void | setContentView (int layoutResID) |
void | setOnDismissListener (PopupWindow.OnDismissListener listener) |
void | showDropDown () |
void | showDropDown (int xOffset, int yOffset) |
void | showLikeQuickAction () |
void | showLikeQuickAction (int xOffset, int yOffset) |
void | dismiss () |
Protected Member Functions | |
void | onCreate () |
void | onShow () |
void | preShow () |
Protected Attributes | |
final View | anchor |
final PopupWindow | window |
final WindowManager | windowManager |
This class does most of the work of wrapping the PopupWindow so it's simpler to use. Edited by Lorensius. W. L. T
net.londatiga.android.CustomPopupWindow.CustomPopupWindow | ( | View | anchor | ) |
Create a QuickAction
anchor | the view that the QuickAction will be displaying 'from' |
void net.londatiga.android.CustomPopupWindow.onCreate | ( | ) | [protected] |
Anything you want to have happen when created. Probably should create a view and setup the event listeners on child views.
void net.londatiga.android.CustomPopupWindow.onShow | ( | ) | [protected] |
In case there is stuff to do right before displaying.
void net.londatiga.android.CustomPopupWindow.preShow | ( | ) | [protected] |
void net.londatiga.android.CustomPopupWindow.setBackgroundDrawable | ( | Drawable | background | ) |
void net.londatiga.android.CustomPopupWindow.setContentView | ( | View | root | ) |
Sets the content view. Probably should be called from onCreate
root | the view the popup will display |
void net.londatiga.android.CustomPopupWindow.setContentView | ( | int | layoutResID | ) |
Will inflate and set the view from a resource id
layoutResID |
void net.londatiga.android.CustomPopupWindow.setOnDismissListener | ( | PopupWindow.OnDismissListener | listener | ) |
If you want to do anything when dismiss is called
listener |
Displays like a popdown menu from the anchor view
void net.londatiga.android.CustomPopupWindow.showDropDown | ( | int | xOffset, |
int | yOffset | ||
) |
Displays like a popdown menu from the anchor view.
xOffset | offset in X direction |
yOffset | offset in Y direction |
Displays like a QuickAction from the anchor view.
void net.londatiga.android.CustomPopupWindow.showLikeQuickAction | ( | int | xOffset, |
int | yOffset | ||
) |
Displays like a QuickAction from the anchor view.
xOffset | offset in the X direction |
yOffset | offset in the Y direction |
final View net.londatiga.android.CustomPopupWindow.anchor [protected] |
final PopupWindow net.londatiga.android.CustomPopupWindow.window [protected] |
final WindowManager net.londatiga.android.CustomPopupWindow.windowManager [protected] |