public class IndeterminateHorizontalProgressDrawable extends android.graphics.drawable.Drawable implements ShowBackgroundDrawable
Drawable for indeterminate horizontal ProgressBar.| Modifier and Type | Field and Description |
|---|---|
protected int |
mAlpha |
protected android.animation.Animator[] |
mAnimators |
protected android.graphics.ColorFilter |
mColorFilter |
protected android.graphics.PorterDuffColorFilter |
mTintFilter |
protected android.content.res.ColorStateList |
mTintList |
protected android.graphics.PorterDuff.Mode |
mTintMode |
protected boolean |
mUseIntrinsicPadding |
| Constructor and Description |
|---|
IndeterminateHorizontalProgressDrawable(android.content.Context context)
Create a new
IndeterminateHorizontalProgressDrawable. |
| Modifier and Type | Method and Description |
|---|---|
void |
draw(android.graphics.Canvas canvas) |
int |
getAlpha() |
android.graphics.ColorFilter |
getColorFilter() |
protected android.graphics.ColorFilter |
getColorFilterForDrawing() |
android.graphics.drawable.Drawable.ConstantState |
getConstantState() |
int |
getIntrinsicHeight() |
int |
getOpacity() |
boolean |
getShowBackground()
Get whether this drawable is showing a background.
|
boolean |
getUseIntrinsicPadding()
Get whether this drawable is using an intrinsic padding.
|
boolean |
isRunning() |
boolean |
isStateful() |
protected void |
onDraw(android.graphics.Canvas canvas,
int width,
int height) |
protected void |
onDraw(android.graphics.Canvas canvas,
int width,
int height,
android.graphics.Paint paint) |
protected void |
onPreparePaint(android.graphics.Paint paint) |
protected boolean |
onStateChange(int[] state) |
void |
setAlpha(int alpha) |
void |
setColorFilter(android.graphics.ColorFilter colorFilter) |
void |
setShowBackground(boolean show)
Set whether this drawable should show a background.
|
void |
setTint(int tintColor)
Specifies tint color for this drawable.
|
void |
setTintList(android.content.res.ColorStateList tint)
Specifies tint color for this drawable as a color state list.
|
void |
setTintMode(android.graphics.PorterDuff.Mode tintMode)
Specifies a tint blending mode for this drawable.
|
void |
setUseIntrinsicPadding(boolean useIntrinsicPadding)
Set whether this drawable should use an intrinsic padding.
|
void |
start() |
void |
stop() |
applyTheme, canApplyTheme, clearColorFilter, copyBounds, copyBounds, createFromPath, createFromResourceStream, createFromResourceStream, createFromStream, createFromXml, createFromXml, createFromXmlInner, createFromXmlInner, getBounds, getCallback, getChangingConfigurations, getCurrent, getDirtyBounds, getHotspotBounds, getIntrinsicWidth, getLayoutDirection, getLevel, getMinimumHeight, getMinimumWidth, getOutline, getPadding, getState, getTransparentRegion, inflate, inflate, invalidateSelf, isAutoMirrored, isFilterBitmap, isVisible, jumpToCurrentState, mutate, onBoundsChange, onLayoutDirectionChanged, onLevelChange, resolveOpacity, scheduleSelf, setAutoMirrored, setBounds, setBounds, setCallback, setChangingConfigurations, setColorFilter, setDither, setFilterBitmap, setHotspot, setHotspotBounds, setLayoutDirection, setLevel, setState, setVisible, unscheduleSelfprotected android.animation.Animator[] mAnimators
protected boolean mUseIntrinsicPadding
protected int mAlpha
protected android.graphics.ColorFilter mColorFilter
protected android.content.res.ColorStateList mTintList
protected android.graphics.PorterDuff.Mode mTintMode
protected android.graphics.PorterDuffColorFilter mTintFilter
public IndeterminateHorizontalProgressDrawable(android.content.Context context)
IndeterminateHorizontalProgressDrawable.context - the Context for retrieving style information.public boolean getShowBackground()
true.getShowBackground in interface ShowBackgroundDrawablepublic void setShowBackground(boolean show)
true.setShowBackground in interface ShowBackgroundDrawableshow - Whether background should be shown.public int getIntrinsicHeight()
getIntrinsicHeight in class android.graphics.drawable.Drawableprotected void onPreparePaint(android.graphics.Paint paint)
protected void onDraw(android.graphics.Canvas canvas,
int width,
int height,
android.graphics.Paint paint)
public void draw(android.graphics.Canvas canvas)
public void start()
start in interface android.graphics.drawable.Animatablepublic void stop()
stop in interface android.graphics.drawable.Animatablepublic boolean isRunning()
isRunning in interface android.graphics.drawable.Animatablepublic boolean getUseIntrinsicPadding()
true.getUseIntrinsicPadding in interface IntrinsicPaddingDrawablepublic void setUseIntrinsicPadding(boolean useIntrinsicPadding)
true.setUseIntrinsicPadding in interface IntrinsicPaddingDrawableuseIntrinsicPadding - Whether this drawable should use its intrinsic padding.protected final void onDraw(android.graphics.Canvas canvas,
int width,
int height)
public int getAlpha()
getAlpha in class android.graphics.drawable.Drawablepublic void setAlpha(int alpha)
setAlpha in class android.graphics.drawable.Drawablepublic android.graphics.ColorFilter getColorFilter()
getColorFilter in class android.graphics.drawable.Drawablepublic void setColorFilter(@Nullable
android.graphics.ColorFilter colorFilter)
setColorFilter in class android.graphics.drawable.Drawablepublic void setTint(int tintColor)
A Drawable's drawing content will be blended together with its tint
before it is drawn to the screen. This functions similarly to
Drawable.setColorFilter(int, PorterDuff.Mode).
To clear the tint, pass null to
TintableDrawable.setTintList(ColorStateList).
Note: Setting a color filter via
Drawable.setColorFilter(ColorFilter) or
Drawable.setColorFilter(int, PorterDuff.Mode) overrides tint.
setTint in interface TintableDrawablesetTint in class android.graphics.drawable.DrawabletintColor - Color to use for tinting this drawableTintableDrawable.setTintList(ColorStateList),
TintableDrawable.setTintMode(PorterDuff.Mode)public void setTintList(@Nullable
android.content.res.ColorStateList tint)
A Drawable's drawing content will be blended together with its tint
before it is drawn to the screen. This functions similarly to
Drawable.setColorFilter(int, PorterDuff.Mode).
Note: Setting a color filter via
Drawable.setColorFilter(ColorFilter) or
Drawable.setColorFilter(int, PorterDuff.Mode) overrides tint.
setTintList in interface TintableDrawablesetTintList in class android.graphics.drawable.Drawabletint - Color state list to use for tinting this drawable, or
null to clear the tintTintableDrawable.setTint(int),
TintableDrawable.setTintMode(PorterDuff.Mode)public void setTintMode(@NonNull
android.graphics.PorterDuff.Mode tintMode)
Defines how this drawable's tint color should be blended into the drawable
before it is drawn to screen. Default tint mode is PorterDuff.Mode#SRC_IN.
Note: Setting a color filter via
Drawable.setColorFilter(ColorFilter) or
Drawable.setColorFilter(int, PorterDuff.Mode) overrides tint.
setTintMode in interface TintableDrawablesetTintMode in class android.graphics.drawable.DrawabletintMode - A Porter-Duff blending modeTintableDrawable.setTint(int),
TintableDrawable.setTintList(ColorStateList)public boolean isStateful()
isStateful in class android.graphics.drawable.Drawableprotected boolean onStateChange(int[] state)
onStateChange in class android.graphics.drawable.Drawablepublic int getOpacity()
getOpacity in class android.graphics.drawable.Drawableprotected android.graphics.ColorFilter getColorFilterForDrawing()
public android.graphics.drawable.Drawable.ConstantState getConstantState()
getConstantState in class android.graphics.drawable.Drawable