java.lang.Object | ||
↳ | android.widget.PopupWindow | |
↳ | greendroid.widget.QuickActionWidget |
![]() |
Abstraction of a QuickAction
wrapper. A QuickActionWidget is
displayed on top of the user interface (it overlaps all UI elements but the
notification bar). Clients may listen to user actions using a
QuickActionWidget.OnQuickActionClickListener
.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
QuickActionWidget.OnQuickActionClickListener | Interface that may be used to listen to clicks on quick actions. |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new QuickActionWidget for the given context.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Add a new QuickAction to this
QuickActionWidget . | |||||||||||
Removes all
QuickAction from this QuickActionWidget . | |||||||||||
Returns the arrow offset for the Y axis.
| |||||||||||
Sets the arrow offset to a new value.
| |||||||||||
Equivalent to
setContentView(View) but with a layout
identifier. | |||||||||||
By default, a
QuickActionWidget is dismissed once the user
clicked on a QuickAction . | |||||||||||
Call that method to display the
QuickActionWidget anchored to the
given view. |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns the height of the screen.
| |||||||||||
Returns the width of the screen.
| |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Creates a new QuickActionWidget for the given context.
context | The context in which the QuickActionWidget is running in |
---|
Add a new QuickAction to this QuickActionWidget
. Adding a new
QuickAction
while the QuickActionWidget
is currently
being shown does nothing. The new QuickAction
will be displayed
on the next call to show(View)
.
action | The new QuickAction to add
|
---|
Returns the arrow offset for the Y axis.
Sets the arrow offset to a new value. Setting an arrow offset may be
particular useful to warn which view the QuickActionWidget is related to.
By setting a positive offset, the arrow will overlap the view given by
show(View)
. The default value is 5dp.
offsetY | The offset for the Y axis |
---|
Equivalent to setContentView(View)
but with a layout
identifier.
layoutId | The layout identifier of the view to use. |
---|
By default, a QuickActionWidget
is dismissed once the user
clicked on a QuickAction
. This behavior can be changed using this
method.
dismissOnClick | True if you want the QuickActionWidget to
be dismissed on click else false.
|
---|
Call that method to display the QuickActionWidget
anchored to the
given view.
anchor | The view the QuickActionWidget will be anchored to.
|
---|
Returns the height of the screen.
Returns the width of the screen.