java.lang.Object | |
↳ | com.droidux.pack.action.widget.ActionDrawer.Builder |
Use this class to build and customize the action drawer.
You need to provide an implementation of
the ActionDrawer.Callback
interface that create the drawer's view and prepare the drawer's view before it is shown.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Build the action drawer.
| |||||||||||
Sets the bitmap to use as the arrow to point to an anchor view.
| |||||||||||
Sets whether the bezel swipe is enabled.
| |||||||||||
Sets the distance from the bezel within which the bezel swipe will be activated.
| |||||||||||
Sets whether the action drawer should be overlaid by content (
CONTENT_OVERLAY )
or the whole view/window (WINDOW_OVERLAY ). | |||||||||||
Whether to draw the drawer on top or behind the content.
| |||||||||||
Sets the drawer's width, in pixels or in ratio.
| |||||||||||
Sets the drawable to use as the drop shadow.
| |||||||||||
Sets the drawable to use as the drop shadow.
| |||||||||||
Enable or disable drawing of the drop shadow.
| |||||||||||
Sets the width of the drop shadow.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Build the action drawer.
Important: If you set the drawer's mode toCONTENT_OVERLAY
, you need to call
the setContentView(int), or its variants, before building the action drawer.
Sets the bitmap to use as the arrow to point to an anchor view. See setArrowAnchor(android.view.View)
.
arrow | The arrow bitmap. |
---|
Sets whether the bezel swipe is enabled.
Bezel swipe is a swipe gesture that starts outside the phone UI ie. on the phone's bezel.
To set the width of the bezel, call setBezelSwipeWidth(int)
enabled | If true , the bezel swipe is enabled. Otherwise, it's disabled.
|
---|
Sets the distance from the bezel within which the bezel swipe will be activated.
width | The bezel width. Default is 24dp. |
---|
Sets whether the action drawer should be overlaid by content (CONTENT_OVERLAY
)
or the whole view/window (WINDOW_OVERLAY
).
mode | The action drawer mode. |
---|
Whether to draw the drawer on top or behind the content.
onTop | If true , the drawer will be drawn on top of the content. Default is false
|
---|
position | The position of the action drawer. |
---|
Sets the drawer's width, in pixels or in ratio.
pixelsOrRatio | If > 1.0, the drawer's width will be set to the specified value. If between 0.0 - 1.0, the width
will be set to (pixelsToRatio * contentView.width). Default is 0.8 .
|
---|
Sets the drawable to use as the drop shadow. The resource should refer to a Drawable.
If the setShadowEnabled(boolean)
is set to true
, and the shadow drawable is set to null
,
a default drawable will be used.
shadowResId | The identifier of the resource |
---|
Sets the drawable to use as the drop shadow. The resource should refer to a Drawable.
If the setShadowEnabled(boolean)
is set to true
, and the shadow drawable is set to null
,
a default drawable will be used.
shadow | The Drawable to use as the drop shadow. |
---|
Enable or disable drawing of the drop shadow.
If drawing drop shadow is enabled, and the shadow drawable is set to null
(setShadowDrawable(android.graphics.drawable.Drawable)
,
a default drawable will be used.
enable | If true, a drop shadow will be drawn. |
---|
Sets the width of the drop shadow.
pixels | The width in pixels. |
---|