public abstract class LoadingDrawable extends Drawable implements Animatable, Animatable
Drawable.Callback, Drawable.ConstantState| 限定符和类型 | 字段和说明 |
|---|---|
protected static int |
LINE_SIZE |
protected Paint |
mBackgroundPaint |
protected Paint |
mForegroundPaint |
protected static int |
MIN_SIZE |
ANIMATION_DURATION, FRAME_DURATION| 构造器和说明 |
|---|
LoadingDrawable() |
LoadingDrawable(int minSize) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
draw(Canvas canvas) |
protected abstract void |
drawBackground(Canvas canvas,
Paint backgroundPaint) |
protected abstract void |
drawForeground(Canvas canvas,
Paint foregroundPaint) |
int |
getBackgroundColor() |
float |
getBackgroundLineSize() |
int[] |
getForegroundColor() |
float |
getForegroundLineSize() |
int |
getIntrinsicHeight() |
int |
getIntrinsicWidth() |
int |
getNextForegroundColor() |
int |
getOpacity() |
float |
getProgress()
Get the loading progress
|
boolean |
isRunning() |
protected abstract void |
onProgressChange(float progress) |
protected abstract void |
refresh(long startTime,
long curTime,
long timeLong) |
void |
setAlpha(int alpha) |
void |
setBackgroundColor(int color) |
void |
setBackgroundLineSize(float size) |
void |
setColorFilter(ColorFilter cf) |
void |
setForegroundColor(int color) |
void |
setForegroundColor(int[] colors) |
void |
setForegroundLineSize(float size) |
void |
setProgress(float progress)
Set the draw progress
The progress include 0~1 float
On changed, stop animation draw
|
void |
start() |
void |
stop() |
applyTheme, canApplyTheme, clearColorFilter, copyBounds, copyBounds, createFromPath, createFromResourceStream, createFromResourceStream, createFromStream, createFromXml, createFromXml, createFromXmlInner, createFromXmlInner, getAlpha, getBounds, getCallback, getChangingConfigurations, getColorFilter, getConstantState, getCurrent, getDirtyBounds, getHotspotBounds, getLayoutDirection, getLevel, getMinimumHeight, getMinimumWidth, getOutline, getPadding, getState, getTransparentRegion, inflate, inflate, invalidateSelf, isAutoMirrored, isFilterBitmap, isStateful, isVisible, jumpToCurrentState, mutate, onBoundsChange, onLayoutDirectionChanged, onLevelChange, onStateChange, resolveOpacity, scheduleSelf, setAutoMirrored, setBounds, setBounds, setCallback, setChangingConfigurations, setColorFilter, setDither, setFilterBitmap, setHotspot, setHotspotBounds, setLayoutDirection, setLevel, setState, setTint, setTintList, setTintMode, setVisible, unscheduleSelfprotected static final int LINE_SIZE
protected static int MIN_SIZE
protected Paint mForegroundPaint
protected Paint mBackgroundPaint
public LoadingDrawable()
public LoadingDrawable(int minSize)
public int getIntrinsicHeight()
getIntrinsicHeight 在类中 Drawablepublic int getIntrinsicWidth()
getIntrinsicWidth 在类中 Drawablepublic void setBackgroundLineSize(float size)
public void setForegroundLineSize(float size)
public float getBackgroundLineSize()
public float getForegroundLineSize()
public void setBackgroundColor(int color)
public int getBackgroundColor()
public void setForegroundColor(int color)
public void setForegroundColor(int[] colors)
public int[] getForegroundColor()
public int getNextForegroundColor()
public float getProgress()
public void setProgress(float progress)
progress - Loading progresspublic boolean isRunning()
isRunning 在接口中 Animatablepublic void start()
start 在接口中 Animatablepublic void stop()
stop 在接口中 Animatablepublic void setColorFilter(ColorFilter cf)
setColorFilter 在类中 Drawablepublic int getOpacity()
getOpacity 在类中 Drawableprotected abstract void refresh(long startTime,
long curTime,
long timeLong)
protected abstract void onProgressChange(float progress)