public class HorizontalProgressDrawable
extends android.graphics.drawable.LayerDrawable
Drawable for determinate horizontal ProgressBar.| Constructor and Description |
|---|
HorizontalProgressDrawable(android.content.Context context)
Create a new
HorizontalProgressDrawable. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
getShowBackground()
Get whether this drawable is showing a background.
|
boolean |
getUseIntrinsicPadding()
Get whether this drawable is using an intrinsic padding.
|
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.
|
addLayer, applyTheme, canApplyTheme, draw, findDrawableByLayerId, findIndexByLayerId, getAlpha, getBottomPadding, getChangingConfigurations, getConstantState, getDrawable, getEndPadding, getHotspotBounds, getId, getIntrinsicHeight, getIntrinsicWidth, getLayerGravity, getLayerHeight, getLayerInsetBottom, getLayerInsetEnd, getLayerInsetLeft, getLayerInsetRight, getLayerInsetStart, getLayerInsetTop, getLayerWidth, getLeftPadding, getNumberOfLayers, getOpacity, getOutline, getPadding, getPaddingMode, getRightPadding, getStartPadding, getTopPadding, inflate, invalidateDrawable, isAutoMirrored, isStateful, jumpToCurrentState, mutate, onBoundsChange, onLayoutDirectionChanged, onLevelChange, onStateChange, scheduleDrawable, setAlpha, setAutoMirrored, setColorFilter, setDither, setDrawable, setDrawableByLayerId, setHotspot, setHotspotBounds, setId, setLayerGravity, setLayerHeight, setLayerInset, setLayerInsetBottom, setLayerInsetEnd, setLayerInsetLeft, setLayerInsetRelative, setLayerInsetRight, setLayerInsetStart, setLayerInsetTop, setLayerSize, setLayerWidth, setOpacity, setPadding, setPaddingMode, setPaddingRelative, setVisible, unscheduleDrawableclearColorFilter, copyBounds, copyBounds, createFromPath, createFromResourceStream, createFromResourceStream, createFromStream, createFromXml, createFromXml, createFromXmlInner, createFromXmlInner, getBounds, getCallback, getColorFilter, getCurrent, getDirtyBounds, getLayoutDirection, getLevel, getMinimumHeight, getMinimumWidth, getState, getTransparentRegion, inflate, invalidateSelf, isFilterBitmap, isVisible, resolveOpacity, scheduleSelf, setBounds, setBounds, setCallback, setChangingConfigurations, setColorFilter, setFilterBitmap, setLayoutDirection, setLevel, setState, unscheduleSelfpublic HorizontalProgressDrawable(android.content.Context context)
HorizontalProgressDrawable.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 boolean getUseIntrinsicPadding()
true.getUseIntrinsicPadding in interface IntrinsicPaddingDrawablepublic void setUseIntrinsicPadding(boolean useIntrinsicPadding)
true.setUseIntrinsicPadding in interface IntrinsicPaddingDrawableuseIntrinsicPadding - Whether this drawable should use its intrinsic padding.public 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.LayerDrawabletint - 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.LayerDrawabletintMode - A Porter-Duff blending modeTintableDrawable.setTint(int),
TintableDrawable.setTintList(ColorStateList)