belongs to Maven artifact com.android.support:appcompat-v7:28.0.0-alpha1
DrawerArrowDrawable
public
class
DrawerArrowDrawable
extends Drawable
java.lang.Object | ||
↳ | android.graphics.drawable.Drawable | |
↳ | android.support.v7.graphics.drawable.DrawerArrowDrawable |
A drawable that can draw a "Drawer hamburger" menu or an arrow and animate between them.
The progress between the two states is controlled via setProgress(float)
.
Summary
Constants | |
---|---|
int |
ARROW_DIRECTION_END
Direction to make the arrow point to the end. |
int |
ARROW_DIRECTION_LEFT
Direction to make the arrow point towards the left. |
int |
ARROW_DIRECTION_RIGHT
Direction to make the arrow point towards the right. |
int |
ARROW_DIRECTION_START
Direction to make the arrow point towards the start. |
Public constructors | |
---|---|
DrawerArrowDrawable(Context context)
|
Public methods | |
---|---|
void
|
draw(Canvas canvas)
|
float
|
getArrowHeadLength()
Returns the length of the arrow head (from tip to edge, perpendicular to the shaft), in pixels. |
float
|
getArrowShaftLength()
Returns the arrow shaft length in pixels. |
float
|
getBarLength()
The length of the bars when they are parallel to each other. |
float
|
getBarThickness()
Returns the thickness (stroke width) of the bars. |
int
|
getColor()
Returns the color of the drawable. |
int
|
getDirection()
Returns the arrow direction. |
float
|
getGapSize()
Returns the max gap between the bars when they are parallel to each other. |
int
|
getIntrinsicHeight()
|
int
|
getIntrinsicWidth()
|
int
|
getOpacity()
|
final
Paint
|
getPaint()
Returns the paint instance used for all drawing. |
float
|
getProgress()
Returns the current progress of the arrow. |
boolean
|
isSpinEnabled()
Returns whether the bars should rotate or not during the transition. |
void
|
setAlpha(int alpha)
|
void
|
|