java.lang.Object | |
↳ | com.droidux.pack.action.widget.QuickPopover |
A custom view/widget that can be used to display arbitrary view. The popover window is a floating container that appears on top of the current activity. The content view will be displayed within a "callout" window with arrow pointing to the specified location/anchor.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | ANIM_AUTO | Automatically determine the appropriate animation based on the popup window location. | |||||||||
int | ANIM_FADE | Fade animation. | |||||||||
int | ANIM_GROW_FROM_CENTER | Grow from center. | |||||||||
int | ANIM_GROW_FROM_LEFT | Grow from left. | |||||||||
int | ANIM_GROW_FROM_RIGHT | Grow from right. | |||||||||
int | ANIM_NONE | No animation. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Dispose of the popup window.
| |||||||||||
Gets the content of the popover window
| |||||||||||
Indicates whether the popup window is showing on screen.
| |||||||||||
Resets the callout drawables to defaults.
| |||||||||||
Sets the animation used when the window is showing or closing.
| |||||||||||
Sets the drawables for the callout.
| |||||||||||
Sets the drawables for the callout.
| |||||||||||
Sets the tint color of the callout drawables.
| |||||||||||
Sets the content view that will be displayed inside the popover window.
| |||||||||||
This method is deprecated.
Use
show(android.view.View, int, int, com.droidux.pack.action.interfaces.ActionInterfaces.Window.PopupWindowPlacement)
instead.
| |||||||||||
Display the content view in a popup window anchored to the anchor view.
| |||||||||||
Display the content view in a popup window at the specified location.
| |||||||||||
Display the content view in a popup window anchored to the anchor view.
| |||||||||||
This method is deprecated.
Use
show(android.view.View, com.droidux.pack.action.interfaces.ActionInterfaces.Window.PopupWindowPlacement)
instead.
| |||||||||||
Display the content view in a popup window anchored to the anchor view.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Gets the drawable of the base of the callout background.
| |||||||||||
Gets the drawable of the bottom arrow of the callout background.
| |||||||||||
Gets the drawable of the left arrow of the callout background.
| |||||||||||
Gets the offsets between the arrows and the base.
| |||||||||||
Gets the drawable of the right arrow of the callout background.
| |||||||||||
Gets the drawable of the top arrow of the callout background.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Automatically determine the appropriate animation based on the popup window location.
Grow from center.
Grow from left.
Grow from right.
Dispose of the popup window. If the popup window has not been shown, calling this method will have no effect.
Gets the content of the popover window
Indicates whether the popup window is showing on screen.
Sets the drawables for the callout. The callout consist of a base (should be a nine-patch drawable) and 4 arrows (left, top, right, bottom). To form the callout the base drawable will be merged with one of the arrows, depending on which direction the arrow should point to. In order to merge the base and the arrow correctly, you have to provide the offset/distance between the border of the base drawable to the base of the arrow drawable.
baseId | The resource id for the base drawable. |
---|---|
leftArrowId | The resource id for the left arrow drawable. |
topArrowId | The resource id for the top arrow drawable. |
rightArrowId | The resource id for the right arrow drawable. |
bottomArrowId | The resource id for the bottom arrow drawable. |
offsets | The offset/distance between the border of the base/rect drawable to the baseline of the arrow drawable. |
unitsInDp | If true the given offsets are assumed to be in dip unit. Otherwise, the unit
is in pixels.
|
Sets the drawables for the callout. The callout consist of a base (should be a nine-patch drawable) and 4 arrows (left, top, right, bottom). To form the callout the base drawable will be merged with one of the arrows, depending on which direction the arrow should point to. In order to merge the base and the arrow correctly, you have to provide the offset/distance between the border of the base drawable to the base of the arrow drawable.
baseId | The resource id for the base drawable. |
---|---|
leftArrowId | The resource id for the left arrow drawable. |
topArrowId | The resource id for the top arrow drawable. |
rightArrowId | The resource id for the right arrow drawable. |
bottomArrowId | The resource id for the bottom arrow drawable. |
offsets | The offset/distance between the border of the base/rect drawable to the baseline of the arrow drawable. The offsets are in dip unit. |
Sets the tint color of the callout drawables.
tint | The tint color to be applied to the callout drawables. |
---|
Sets the content view that will be displayed inside the popover window.
content | The view to be displayed inside the window. |
---|
This method is deprecated.
Use show(android.view.View, int, int, com.droidux.pack.action.interfaces.ActionInterfaces.Window.PopupWindowPlacement)
instead.
Display the content view in a popup window at the specified location.
The popup window can be displayed above, below, left or right of the anchor view, depending on the available space
that can contain the window size, and the value of the horizontalArrows
parameter.
parent | The view which the window will be anchored to. |
---|---|
targetXPos | The X coordinate of the location where the popup should be displayed. |
targetYPos | The Y coordinate of the location where the popup should be displayed. |
horizontalArrows | If true, the arrows of the callout background will have horizontal orientation (left/right). By default, the arrows have vertical orientation (top/bottom). |
Display the content view in a popup window anchored to the anchor view.
The popup window can be displayed above, below, left or right of the anchor view, depending on the available space
that can contain the window size, and the value of the placement
parameter.
anchor | The view which the window will be anchored to. |
---|---|
placement | The preferred placement of the popup window (above, below, left or right). If the requested placement
can't be satisfied, e.g. due to space constraint, it will try to automatically place the popup window
where it can fit. For example, if BELOW or
ABOVE
can't be satisfied, it will try with VERTICAL_AUTO .
And if LEFT or
RIGHT can' be satisfied,
it will try HORIZONTAL_AUTO .
|
Display the content view in a popup window at the specified location.
parent | a parent view to get the getWindowToken() token from |
---|---|
targetXPos | the popup x location. This should be a raw value. See MotionEvent.getRawX(). |
targetYPos | the popup y location. This should be a raw value. See MotionEvent.getRawY(). |
Display the content view in a popup window anchored to the anchor view. The popup window can be displayed above or below the anchor view depends on the available space that can contain the window size.
anchor | The view which the window will be anchored to. |
---|
This method is deprecated.
Use show(android.view.View, com.droidux.pack.action.interfaces.ActionInterfaces.Window.PopupWindowPlacement)
instead.
Display the content view in a popup window anchored to the anchor view.
The popup window can be displayed above, below, left or right of the anchor view, depending on the available space
that can contain the window size, and the value of the horizontalArrows
parameter.
anchor | The view which the window will be anchored to. |
---|---|
horizontalArrows | If true, the arrows of the callout background will have horizontal orientation (left/right). By default, the arrows have vertical orientation (top/bottom). |
Display the content view in a popup window anchored to the anchor view.
The popup window can be displayed above, below, left or right of the anchor view, depending on the available space
that can contain the window size, and the value of the placement
parameter.
parent | The view which the window will be anchored to. |
---|---|
targetXPos | The X coordinate of the location where the popup should be displayed. |
targetYPos | The Y coordinate of the location where the popup should be displayed. |
placement | The preferred placement of the popup window (above, below, left or right). If the requested placement
can't be satisfied, e.g. due to space constraint, it will try to automatically place the popup window
where it can fit. For example, if BELOW or
ABOVE
can't be satisfied, it will try with VERTICAL_AUTO .
And if LEFT or
RIGHT can' be satisfied,
it will try HORIZONTAL_AUTO .
|
Gets the drawable of the base of the callout background. You can override this method to return your own callout background.
Gets the drawable of the bottom arrow of the callout background. You can override this method to return your own callout background.
Gets the drawable of the left arrow of the callout background. You can override this method to return your own callout background.
Gets the offsets between the arrows and the base. You can override this method to return your own callout background.
Gets the drawable of the right arrow of the callout background. You can override this method to return your own callout background.
Gets the drawable of the top arrow of the callout background.