public class MaterialMenuDrawable
extends android.graphics.drawable.Drawable
implements android.graphics.drawable.Animatable
限定符和类型 | 类和说明 |
---|---|
static class |
MaterialMenuDrawable.AnimationState |
static class |
MaterialMenuDrawable.IconState |
static class |
MaterialMenuDrawable.Stroke |
限定符和类型 | 字段和说明 |
---|---|
static int |
DEFAULT_COLOR |
static int |
DEFAULT_PRESSED_DURATION |
static int |
DEFAULT_SCALE |
static int |
DEFAULT_TRANSFORM_DURATION |
构造器和说明 |
---|
MaterialMenuDrawable(android.content.Context context,
int color,
MaterialMenuDrawable.Stroke stroke) |
MaterialMenuDrawable(android.content.Context context,
int color,
MaterialMenuDrawable.Stroke stroke,
int transformDuration,
int pressedDuration) |
MaterialMenuDrawable(android.content.Context context,
int color,
MaterialMenuDrawable.Stroke stroke,
int scale,
int transformDuration,
int pressedDuration) |
限定符和类型 | 方法和说明 |
---|---|
void |
animateIconState(MaterialMenuDrawable.IconState state,
boolean drawTouch) |
void |
draw(android.graphics.Canvas canvas) |
android.graphics.drawable.Drawable.ConstantState |
getConstantState() |
MaterialMenuDrawable.IconState |
getIconState() |
int |
getIntrinsicHeight() |
int |
getIntrinsicWidth() |
int |
getOpacity() |
java.lang.Float |
getPressedProgress() |
java.lang.Float |
getTransformationValue() |
boolean |
isRunning() |
android.graphics.drawable.Drawable |
mutate() |
void |
setAlpha(int alpha) |
void |
setColor(int color) |
void |
setColorFilter(android.graphics.ColorFilter cf) |
void |
setIconState(MaterialMenuDrawable.IconState iconState) |
void |
setInterpolator(android.view.animation.Interpolator interpolator) |
void |
setNeverDrawTouch(boolean neverDrawTouch) |
void |
setPressedDuration(int duration) |
void |
setPressedProgress(java.lang.Float value) |
void |
setRTLEnabled(boolean rtlEnabled) |
void |
setTransformationDuration(int duration) |
MaterialMenuDrawable.IconState |
setTransformationOffset(MaterialMenuDrawable.AnimationState animationState,
float offset) |
void |
setTransformationValue(java.lang.Float value) |
void |
start() |
void |
stop() |
applyTheme, canApplyTheme, clearColorFilter, copyBounds, copyBounds, createFromPath, createFromResourceStream, createFromResourceStream, createFromStream, createFromXml, createFromXml, createFromXmlInner, createFromXmlInner, getAlpha, getBounds, getCallback, getChangingConfigurations, getColorFilter, getCurrent, getDirtyBounds, getLevel, getMinimumHeight, getMinimumWidth, getOutline, getPadding, getState, getTransparentRegion, inflate, inflate, invalidateSelf, isAutoMirrored, isStateful, isVisible, jumpToCurrentState, onBoundsChange, onLevelChange, onStateChange, resolveOpacity, scheduleSelf, setAutoMirrored, setBounds, setBounds, setCallback, setChangingConfigurations, setColorFilter, setDither, setFilterBitmap, setHotspot, setHotspotBounds, setLevel, setState, setTint, setTintList, setTintMode, setVisible, unscheduleSelf
public static final int DEFAULT_COLOR
public static final int DEFAULT_SCALE
public static final int DEFAULT_TRANSFORM_DURATION
public static final int DEFAULT_PRESSED_DURATION
public MaterialMenuDrawable(android.content.Context context, int color, MaterialMenuDrawable.Stroke stroke)
public MaterialMenuDrawable(android.content.Context context, int color, MaterialMenuDrawable.Stroke stroke, int transformDuration, int pressedDuration)
public MaterialMenuDrawable(android.content.Context context, int color, MaterialMenuDrawable.Stroke stroke, int scale, int transformDuration, int pressedDuration)
public void draw(android.graphics.Canvas canvas)
draw
在类中 android.graphics.drawable.Drawable
public void setAlpha(int alpha)
setAlpha
在类中 android.graphics.drawable.Drawable
public void setColorFilter(android.graphics.ColorFilter cf)
setColorFilter
在类中 android.graphics.drawable.Drawable
public int getOpacity()
getOpacity
在类中 android.graphics.drawable.Drawable
public void setColor(int color)
public void setTransformationDuration(int duration)
public void setPressedDuration(int duration)
public void setInterpolator(android.view.animation.Interpolator interpolator)
public void setNeverDrawTouch(boolean neverDrawTouch)
public void setIconState(MaterialMenuDrawable.IconState iconState)
public void animateIconState(MaterialMenuDrawable.IconState state, boolean drawTouch)
public MaterialMenuDrawable.IconState setTransformationOffset(MaterialMenuDrawable.AnimationState animationState, float offset)
public void setRTLEnabled(boolean rtlEnabled)
public MaterialMenuDrawable.IconState getIconState()
public java.lang.Float getTransformationValue()
public void setTransformationValue(java.lang.Float value)
public java.lang.Float getPressedProgress()
public void setPressedProgress(java.lang.Float value)
public void start()
start
在接口中 android.graphics.drawable.Animatable
public void stop()
stop
在接口中 android.graphics.drawable.Animatable
public boolean isRunning()
isRunning
在接口中 android.graphics.drawable.Animatable
public int getIntrinsicWidth()
getIntrinsicWidth
在类中 android.graphics.drawable.Drawable
public int getIntrinsicHeight()
getIntrinsicHeight
在类中 android.graphics.drawable.Drawable
public android.graphics.drawable.Drawable.ConstantState getConstantState()
getConstantState
在类中 android.graphics.drawable.Drawable
public android.graphics.drawable.Drawable mutate()
mutate
在类中 android.graphics.drawable.Drawable