public class IndeterminateHorizontalProgressDrawable extends android.graphics.drawable.Drawable implements ShowBackgroundDrawable
Drawable for indeterminate horizontal ProgressBar.| 限定符和类型 | 字段和说明 |
|---|---|
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 |
| 构造器和说明 |
|---|
IndeterminateHorizontalProgressDrawable(android.content.Context context)
Create a new
IndeterminateHorizontalProgressDrawable. |
| 限定符和类型 | 方法和说明 |
|---|---|
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, unscheduleSelf@NonNull protected android.animation.Animator[] mAnimators
protected boolean mUseIntrinsicPadding
protected int mAlpha
@Nullable protected android.graphics.ColorFilter mColorFilter
@Nullable protected android.content.res.ColorStateList mTintList
@NonNull protected android.graphics.PorterDuff.Mode mTintMode
@Nullable protected android.graphics.PorterDuffColorFilter mTintFilter
public IndeterminateHorizontalProgressDrawable(@NonNull
android.content.Context context)
IndeterminateHorizontalProgressDrawable.context - the Context for retrieving style information.public boolean getShowBackground()
true.getShowBackground 在接口中 ShowBackgroundDrawablepublic void setShowBackground(boolean show)
true.setShowBackground 在接口中 ShowBackgroundDrawableshow - Whether background should be shown.@Px public int getIntrinsicHeight()
getIntrinsicHeight 在类中 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(@NonNull
android.graphics.Canvas canvas)
public void start()
start 在接口中 android.graphics.drawable.Animatablepublic void stop()
stop 在接口中 android.graphics.drawable.Animatablepublic boolean isRunning()
isRunning 在接口中 android.graphics.drawable.Animatablepublic boolean getUseIntrinsicPadding()
true.getUseIntrinsicPadding 在接口中 IntrinsicPaddingDrawablepublic void setUseIntrinsicPadding(boolean useIntrinsicPadding)
true.setUseIntrinsicPadding 在接口中 IntrinsicPaddingDrawableuseIntrinsicPadding - Whether this drawable should use its intrinsic padding.protected final void onDraw(@NonNull
android.graphics.Canvas canvas,
int width,
int height)
public int getAlpha()
getAlpha 在类中 android.graphics.drawable.Drawablepublic void setAlpha(int alpha)
setAlpha 在类中 android.graphics.drawable.Drawable@Nullable public android.graphics.ColorFilter getColorFilter()
getColorFilter 在类中 android.graphics.drawable.Drawablepublic void setColorFilter(@Nullable
android.graphics.ColorFilter colorFilter)
setColorFilter 在类中 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 在接口中 androidx.core.graphics.drawable.TintAwareDrawablesetTint 在接口中 TintableDrawablesetTint 在类中 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 在接口中 androidx.core.graphics.drawable.TintAwareDrawablesetTintList 在接口中 TintableDrawablesetTintList 在类中 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 在接口中 androidx.core.graphics.drawable.TintAwareDrawablesetTintMode 在接口中 TintableDrawablesetTintMode 在类中 android.graphics.drawable.DrawabletintMode - A Porter-Duff blending modeTintableDrawable.setTint(int),
TintableDrawable.setTintList(ColorStateList)public boolean isStateful()
isStateful 在类中 android.graphics.drawable.Drawableprotected boolean onStateChange(@NonNull
int[] state)
onStateChange 在类中 android.graphics.drawable.Drawablepublic int getOpacity()
getOpacity 在类中 android.graphics.drawable.Drawable@Nullable protected android.graphics.ColorFilter getColorFilterForDrawing()
@NonNull public android.graphics.drawable.Drawable.ConstantState getConstantState()
getConstantState 在类中 android.graphics.drawable.Drawable