Package icyllis.modernui.widget

# Class ProgressBar

java.lang.Object
icyllis.modernui.view.View
icyllis.modernui.widget.ProgressBar

All Implemented Interfaces:
  `Drawable.Callback`

Direct Known Subclasses:
  `AbsSeekBar`

public class ProgressBar extends View

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class icyllis.modernui.view.View

  `View.DragShadow, View.Focusable, View.FocusableMode, View.FocusDirection, View.FocusRealDirection, View.LayoutDir, View.NestedScrollType, View.OnAttachStateChangeListener, View.OnClickListener, View.OnContextClickListener, View.OnCreateContextMenuListener, View.OnDragListener, View.OnFocusChangeListener, View.OnGenericMotionListener, View.OnHoverListener, View.OnKeyListener, View.OnLayoutChangeListener, View.OnLongClickListener, View.OnScrollChangeListener, View.OnTouchListener, View.ResolvedLayoutDir, View.ScrollAxis, View.ScrollBarStyle, View.ScrollIndicators, View.TextAlignment, View.Visibility`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected static final FloatProperty<ProgressBar>`
  `VISUAL_PROGRESS`
  Property wrapper around the visual state of the `progress` functionality handled by the `setProgress(int, boolean)` method.

  ### Fields inherited from class icyllis.modernui.view.View

  `ALPHA, BOTTOM, EMPTY_STATE_SET, ENABLED_FOCUSED_SELECTED_STATE_SET, ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_FOCUSED_STATE_SET, ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, ENABLED_SELECTED_STATE_SET, ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_STATE_SET, ENABLED_WINDOW_FOCUSED_STATE_SET, FOCUS_BACKWARD, FOCUS_DOWN, FOCUS_FORWARD, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUSABLE, FOCUSABLE_AUTO, FOCUSABLES_ALL, FOCUSABLES_TOUCH_MODE, FOCUSED_SELECTED_STATE_SET, FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, FOCUSED_STATE_SET, FOCUSED_WINDOW_FOCUSED_STATE_SET, GONE, HAPTIC_FEEDBACK_ENABLED, INVISIBLE, LAYOUT_DIRECTION_INHERIT, LAYOUT_DIRECTION_LOCALE, LAYOUT_DIRECTION_LTR, LAYOUT_DIRECTION_RTL, LAYOUT_DIRECTION_UNDEFINED, LEFT, MEASURED_HEIGHT_STATE_SHIFT, MEASURED_SIZE_MASK, MEASURED_STATE_MASK, MEASURED_STATE_TOO_SMALL, mPaddingBottom, mPaddingLeft, mPaddingRight, mPaddingTop, mScrollX, mScrollY, NO_ID, NOT_FOCUSABLE, OVER_SCROLL_ALWAYS, OVER_SCROLL_IF_CONTENT_SCROLLS, OVER_SCROLL_NEVER, PRESSED_ENABLED_FOCUSED_SELECTED_STATE_SET, PRESSED_ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_SELECTED_STATE_SET, PRESSED_ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_STATE_SET, PRESSED_ENABLED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_SELECTED_STATE_SET, PRESSED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_STATE_SET, PRESSED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_SELECTED_STATE_SET, PRESSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_STATE_SET, PRESSED_WINDOW_FOCUSED_STATE_SET, RIGHT, ROTATION, ROTATION_X, ROTATION_Y, SCALE_X, SCALE_Y, SCROLL_AXIS_HORIZONTAL, SCROLL_AXIS_NONE, SCROLL_AXIS_VERTICAL, SCROLL_INDICATOR_BOTTOM, SCROLL_INDICATOR_END, SCROLL_INDICATOR_LEFT, SCROLL_INDICATOR_RIGHT, SCROLL_INDICATOR_START, SCROLL_INDICATOR_TOP, SCROLL_X, SCROLL_Y, SCROLLBARS_INSIDE_INSET, SCROLLBARS_INSIDE_OVERLAY, SCROLLBARS_OUTSIDE_INSET, SCROLLBARS_OUTSIDE_OVERLAY, SELECTED_STATE_SET, SELECTED_WINDOW_FOCUSED_STATE_SET, SOUND_EFFECTS_ENABLED, TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_GRAVITY, TEXT_ALIGNMENT_INHERIT, TEXT_ALIGNMENT_TEXT_END, TEXT_ALIGNMENT_TEXT_START, TEXT_ALIGNMENT_VIEW_END, TEXT_ALIGNMENT_VIEW_START, TEXT_DIRECTION_ANY_RTL, TEXT_DIRECTION_FIRST_STRONG, TEXT_DIRECTION_FIRST_STRONG_LTR, TEXT_DIRECTION_FIRST_STRONG_RTL, TEXT_DIRECTION_INHERIT, TEXT_DIRECTION_LOCALE, TEXT_DIRECTION_LTR, TEXT_DIRECTION_RTL, TOP, TRANSLATION_X, TRANSLATION_Y, TRANSLATION_Z, TYPE_NON_TOUCH, TYPE_TOUCH, VIEW_MARKER, VISIBLE, WINDOW_FOCUSED_STATE_SET, X, Y, Z`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ProgressBar(Context context)`
  Create a new progress bar with range 0...10000 and initial progress of 0.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `drawableHotspotChanged(float x, float y)`
  This function is called whenever the view hotspot changes and needs to be propagated to drawables or child views managed by the view.
  `protected void`
  `drawableStateChanged()`
  This function is called whenever the state of the view changes in such a way that it impacts the state of drawables being shown.
  `Drawable`
  `getCurrentDrawable()`
  Returns the drawable currently used to draw the progress bar.
  `Drawable`
  `getIndeterminateDrawable()`
  Get the drawable used to draw the progress bar in indeterminate mode.
  `BlendMode`
  `getIndeterminateTintBlendMode()`
  Returns the blending mode used to apply the tint to the indeterminate drawable, if specified.
  `ColorStateList`
  `getIndeterminateTintList()`
  `int`
  `getMax()`
  Return the upper limit of this progress bar's range.
  `int`
  `getMaximumHeight()`
  `int`
  `getMaximumWidth()`
  `int`
  `getMin()`
  Return the lower limit of this progress bar's range.
  `int`
  `getProgress()`
  Get the progress bar's current level of progress.
  `BlendMode`
  `getProgressBackgroundTintBlendMode()`
  `ColorStateList`
  `getProgressBackgroundTintList()`
  Returns the tint applied to the progress background, if specified.
  `Drawable`
  `getProgressDrawable()`
  Get the drawable used to draw the progress bar in progress mode.
  `BlendMode`
  `getProgressTintBlendMode()`
  Returns the blending mode used to apply the tint to the progress drawable, if specified.
  `ColorStateList`
  `getProgressTintList()`
  Returns the tint applied to the progress drawable, if specified.
  `int`
  `getSecondaryProgress()`
  Get the progress bar's current level of secondary progress.
  `BlendMode`
  `getSecondaryProgressTintBlendMode()`
  Returns the blending mode used to apply the tint to the secondary progress drawable, if specified.
  `ColorStateList`
  `getSecondaryProgressTintList()`
  Returns the tint applied to the secondary progress drawable, if specified.
  `final void`
  `incrementProgressBy(int diff)`
  Increase the progress bar's progress by the specified amount.
  `final void`
  `incrementSecondaryProgressBy(int diff)`
  Increase the progress bar's secondary progress by the specified amount.
  `boolean`
  `isIndeterminate()`
  Indicate whether this progress bar is in indeterminate mode.
  `void`
  `jumpDrawablesToCurrentState()`
  Call `Drawable.jumpToCurrentState()` on all Drawable objects associated with this view.
  `protected void`
  `onDraw(Canvas canvas)`
  Draw the content of this view, implement this to do your drawing.
  `protected void`
  `onMeasure(int widthMeasureSpec, int heightMeasureSpec)`
  Measure the view and its content to determine the measured width and the measured height.
  `void`
  `onResolveDrawables(int layoutDirection)`
  Called when layout direction has been resolved.
  `protected void`
  `onSizeChanged(int w, int h, int oldw, int oldh)`
  Called when width or height changed
  `void`
  `setIndeterminate(boolean indeterminate)`
  Change the indeterminate mode for this progress bar.
  `void`
  `setIndeterminateDrawable(Drawable d)`
  Define the drawable used to draw the progress bar in indeterminate mode.
  `void`
  `setIndeterminateTintBlendMode(BlendMode blendMode)`
  Specifies the blending mode used to apply the tint specified by `setIndeterminateTintList(ColorStateList)` to the indeterminate drawable.
  `void`
  `setIndeterminateTintList(ColorStateList tint)`
  Applies a tint to the indeterminate drawable.
  `void`
  `setMax(int max)`
  Set the upper range of the progress bar `max`.
  `void`
  `setMaximumHeight(int maxHeight)`
  Sets the maximum height the progress bar can have.
  `void`
  `setMaximumWidth(int maxWidth)`
  Sets the maximum width the progress bar can have.
  `void`
  `setMin(int min)`
  Set the lower range of the progress bar to `min`.
  `void`
  `setProgress(int progress)`
  Sets the current progress to the specified value.
  `void`
  `setProgress(int progress, boolean animate)`
  Sets the current progress to the specified value, optionally animating the visual position between the current and target values.
  `void`
  `setProgressBackgroundTintBlendMode(BlendMode blendMode)`
  Specifies the blending mode used to apply the tint specified by `setProgressBackgroundTintList(ColorStateList)`} to the progress background.
  `void`
  `setProgressBackgroundTintList(ColorStateList tint)`
  Applies a tint to the progress background, if one exists.
  `void`
  `setProgressDrawable(Drawable d)`
  Define the drawable used to draw the progress bar in progress mode.
  `void`
  `setProgressTintBlendMode(BlendMode blendMode)`
  Specifies the blending mode used to apply the tint specified by `setProgressTintList(ColorStateList)`} to the progress indicator.
  `void`
  `setProgressTintList(ColorStateList tint)`
  Applies a tint to the progress indicator, if one exists, or to the entire progress drawable otherwise.
  `void`
  `setSecondaryProgress(int secondaryProgress)`
  Set the current secondary progress to the specified value.
  `void`
  `setSecondaryProgressTintBlendMode(BlendMode blendMode)`
  Specifies the blending mode used to apply the tint specified by `setSecondaryProgressTintList(ColorStateList)`} to the secondary progress indicator.
  `void`
  `setSecondaryProgressTintList(ColorStateList tint)`
  Applies a tint to the secondary progress indicator, if one exists.
  `protected boolean`
  `verifyDrawable(Drawable who)`
  If your view subclass is displaying its own Drawable objects, it should override this function and return true for any Drawable it is displaying.

  ### Methods inherited from class icyllis.modernui.view.View

  `addFocusables, addFocusables, addKeyboardNavigationClusters, addOnAttachStateChangeListener, addOnLayoutChangeListener, addTouchables, awakenScrollBars, awakenScrollBars, callOnClick, cancelLongPress, cancelPendingInputEvents, canReceivePointerEvents, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, clearFocus, combineMeasuredStates, computeHorizontalScrollExtent, computeHorizontalScrollOffset, computeHorizontalScrollRange, computeScroll, computeVerticalScrollExtent, computeVerticalScrollOffset, computeVerticalScrollRange, createContextMenu, dispatchDraw, dispatchDrawableHotspotChanged, dispatchFinishTemporaryDetach, dispatchGenericMotionEvent, dispatchGenericPointerEvent, dispatchHoverEvent, dispatchKeyEvent, dispatchKeyShortcutEvent, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPreScroll, dispatchNestedScroll, dispatchPointerEvent, dispatchSetActivated, dispatchSetPressed, dispatchSetSelected, dispatchStartTemporaryDetach, dispatchTouchEvent, dispatchVisibilityChanged, dispatchWindowFocusChanged, dispatchWindowVisibilityChanged, dp, draw, findFocus, findViewById, findViewByPredicate, findViewByPredicateInsideOut, findViewByPredicateTraversal, findViewTraversal, focusSearch, forceHasOverlappingRendering, forceLayout, generateViewId, getAlpha, getAnimationMatrix, getBackground, getBaseline, getBottom, getBoundsOnScreen, getBoundsOnScreen, getContext, getContextMenuInfo, getDefaultSize, getDrawableState, getDrawingRect, getElevation, getFadingEdge, getFadingEdgeLength, getFocusable, getFocusables, getFocusedRect, getForeground, getForegroundGravity, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHasOverlappingRendering, getHeight, getHitRect, getHorizontalScrollbarHeight, getHorizontalScrollbarThumbDrawable, getHorizontalScrollbarTrackDrawable, getId, getInverseMatrix, getKeyDispatcherState, getLayoutDirection, getLayoutParams, getLeft, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextClusterForwardId, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOnLongClickListener, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getPivotX, getPivotY, getRawLayoutDirection, getRawTextAlignment, getRawTextDirection, getRevealOnFocusHint, getRight, getRootView, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollIndicators, getScrollX, getScrollY, getStateListAnimator, getSuggestedMinimumHeight, getSuggestedMinimumWidth, getTag, getTextAlignment, getTextDirection, getTooltipText, getTooltipView, getTop, getTouchables, getTransitionAlpha, getTransitionName, getTranslationX, getTranslationY, getTranslationZ, getVerticalFadingEdgeLength, getVerticalScrollbarThumbDrawable, getVerticalScrollbarTrackDrawable, getVerticalScrollbarWidth, getViewRoot, getViewTreeObserver, getVisibility, getWidth, getWindowAttachCount, getWindowVisibility, getX, getY, getZ, handleScrollBarDragging, hasExplicitFocusable, hasFocus, hasFocusable, hasIdentityMatrix, hasNestedScrollingParent, hasOnClickListeners, hasOnLongClickListeners, hasOverlappingRendering, hasTransientState, hasTranslationTransientState, hasWindowFocus, internalSetPadding, invalidate, invalidateDrawable, isActivated, isAttachedToWindow, isClickable, isContextClickable, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isFocusedByDefault, isForegroundInsidePadding, isHapticFeedbackEnabled, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isInLayout, isInScrollingContainer, isInTouchMode, isKeyboardNavigationCluster, isLaidOut, isLayoutDirectionInherited, isLayoutDirectionResolved, isLayoutRequested, isLayoutRtl, isLongClickable, isNestedScrollingEnabled, isPaddingRelative, isPivotSet, isPressed, isRootNamespace, isScrollbarFadingEnabled, isSelected, isShowingLayoutBounds, isShown, isSoundEffectsEnabled, isTemporarilyDetached, isTextAlignmentInherited, isTextAlignmentResolved, isTextDirectionInherited, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, isVerticalScrollBarHidden, keyboardNavigationClusterSearch, layout, mapRectFromViewToScreenCoords, measure, mergeDrawableStates, offsetLeftAndRight, offsetTopAndBottom, onAttachedToWindow, onCancelPendingInputEvents, onCreateContextMenu, onCreateDrawableState, onDetachedFromWindow, onDragEvent, onDrawForeground, onDrawScrollBars, onFinishTemporaryDetach, onFocusChanged, onGenericMotionEvent, onHoverChanged, onHoverEvent, onKeyDown, onKeyShortcut, onKeyUp, onLayout, onOverScrolled, onResolvePointerIcon, onRtlPropertiesChanged, onScrollChanged, onStartTemporaryDetach, onTouchEvent, onVisibilityAggregated, onVisibilityChanged, onWindowFocusChanged, onWindowVisibilityChanged, overScrollBy, performButtonActionOnTouchDown, performClick, performContextClick, performContextClick, performHapticFeedback, performHapticFeedback, performLongClick, performLongClick, playSoundEffect, pointInView, post, postDelayed, postInvalidate, postInvalidateDelayed, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, requestFocus, requestFocus, requestFocus, requestLayout, requestRectangleOnScreen, requestRectangleOnScreen, requireViewById, resetPivot, resetResolvedDrawables, resolveDrawables, resolveLayoutDirection, resolveLayoutParams, resolvePadding, resolveRtlPropertiesIfNeeded, resolveSize, resolveSizeAndState, resolveTextAlignment, resolveTextDirection, restoreDefaultFocus, scheduleDrawable, scrollBy, scrollTo, setActivated, setAlpha, setAnimationMatrix, setBackground, setBottom, setClickable, setContextClickable, setDuplicateParentStateEnabled, setElevation, setEnabled, setFocusable, setFocusable, setFocusableInTouchMode, setFocusedByDefault, setFocusedInCluster, setForeground, setForegroundGravity, setFrame, setHapticFeedbackEnabled, setHasTransientState, setHasTranslationTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHorizontalScrollbarThumbDrawable, setHorizontalScrollbarTrackDrawable, setHovered, setId, setIsRootNamespace, setKeyboardNavigationCluster, setLayoutDirection, setLayoutParams, setLeft, setLongClickable, setMeasuredDimension, setMinimumHeight, setMinimumWidth, setNestedScrollingEnabled, setNextClusterForwardId, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnClickListener, setOnContextClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnScrollChangeListener, setOnTouchListener, setOverScrollMode, setPadding, setPaddingRelative, setPivotX, setPivotY, setPressed, setRevealOnFocusHint, setRight, setRotation, setRotationX, setRotationY, setScaleX, setScaleY, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollbarFadingEnabled, setScrollBarSize, setScrollBarStyle, setScrollIndicators, setScrollIndicators, setScrollX, setScrollY, setSelected, setSoundEffectsEnabled, setStateListAnimator, setTag, setTextAlignment, setTextDirection, setTooltipText, setTop, setTransitionAlpha, setTransitionName, setTransitionVisibility, setTranslationX, setTranslationY, setTranslationZ, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarThumbDrawable, setVerticalScrollbarTrackDrawable, setVisibility, setWillNotDraw, setX, setY, setZ, showContextMenu, showContextMenu, sp, startActionMode, startActionMode, startDragAndDrop, startNestedScroll, stopNestedScroll, toGlobalMotionEvent, toLocalMotionEvent, toString, transformFromViewToWindowSpace, transformMatrixToGlobal, transformMatrixToLocal, unscheduleDrawable, unscheduleDrawable, willNotDraw`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### VISUAL_PROGRESS

    protected static final FloatProperty<ProgressBar> VISUAL_PROGRESS
    Property wrapper around the visual state of the `progress` functionality handled by the `setProgress(int, boolean)` method. This does not correspond directly to the actual progress -- only the visual state.

- ## Constructor Details

  - ### ProgressBar

    public ProgressBar(Context context)
    Create a new progress bar with range 0...10000 and initial progress of 0.
    Parameters:
      `context` - the application environment

- ## Method Details

  - ### setMaximumWidth

    public void setMaximumWidth(int maxWidth)
    Sets the maximum width the progress bar can have.
    Parameters:
      `maxWidth` - the maximum width to be set, in pixels

  - ### getMaximumWidth

    public int getMaximumWidth()
    Returns:
      the maximum width the progress bar can have, in pixels

  - ### setMaximumHeight

    public void setMaximumHeight(int maxHeight)
    Sets the maximum height the progress bar can have.
    Parameters:
      `maxHeight` - the maximum height to be set, in pixels

  - ### getMaximumHeight

    public int getMaximumHeight()
    Returns:
      the maximum height the progress bar can have, in pixels

  - ### onMeasure

    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
    Description copied from class: `View`
    Measure the view and its content to determine the measured width and the measured height. This method is invoked by `View.measure(int, int)` and should be overridden by subclasses to provide accurate and efficient measurement of their contents.

    CONTRACT: When overriding this method, you must call `View.setMeasuredDimension(int, int)` to store the measured width and height of this view. Failure to do so will trigger an `IllegalStateException`, thrown by `View.measure(int, int)`. Calling super.onMeasure() is a valid use.

    The base class implementation of measure defaults to the background size, unless a larger size is allowed by the MeasureSpec. Subclasses should override the base one to provide better measurements of their content.

    Overrides:
      `onMeasure` in class `View`
    Parameters:
      `widthMeasureSpec` - width measure specification imposed by the parent `MeasureSpec`
      `heightMeasureSpec` - height measure specification imposed by the parent `MeasureSpec`

  - ### isIndeterminate

    public boolean isIndeterminate()

    Indicate whether this progress bar is in indeterminate mode.

    Returns:
      true if the progress bar is in indeterminate mode

  - ### setIndeterminate

    public void setIndeterminate(boolean indeterminate)

    Change the indeterminate mode for this progress bar. In indeterminate mode, the progress is ignored and the progress bar shows an infinite animation instead.

    If this progress bar's style only supports indeterminate mode (such as the circular progress bars), then this will be ignored.

    Parameters:
      `indeterminate` - true to enable the indeterminate mode

  - ### getIndeterminateDrawable

    public Drawable getIndeterminateDrawable()

    Get the drawable used to draw the progress bar in indeterminate mode.

    Returns:
      a `Drawable` instance
    See Also:
      - `setIndeterminateDrawable(Drawable)`
      - `setIndeterminate(boolean)`

  - ### setIndeterminateDrawable

    public void setIndeterminateDrawable(Drawable d)
    Define the drawable used to draw the progress bar in indeterminate mode.

    For the Drawable to animate, it must implement

    invalid reference

        Animatable

    , or override `Drawable.onLevelChange(int)`. A Drawable that implements Animatable will be animated via that interface and therefore provides the greatest amount of customization. A Drawable that only overrides onLevelChange(int) is animated directly by ProgressBar and only the animation
    invalid reference

        duration

    ,
    invalid reference

        repeating behavior

    , and
    invalid reference

        interpolator

    can be modified, and only before the indeterminate animation begins.
    Parameters:
      `d` - the new drawable
    See Also:
      - `getIndeterminateDrawable()`
      - `setIndeterminate(boolean)`

  - ### setIndeterminateTintList

    public void setIndeterminateTintList(@Nullable ColorStateList tint)
    Applies a tint to the indeterminate drawable. Does not modify the current tint mode, which is `BlendMode.SRC_IN` by default.

    Subsequent calls to `setIndeterminateDrawable(Drawable)` will automatically mutate the drawable and apply the specified tint and tint mode using `Drawable.setTintList(ColorStateList)`.

    Parameters:
      `tint` - the tint to apply, may be `null` to clear tint
    See Also:
      - `getIndeterminateTintList()`
      - `Drawable.setTintList(ColorStateList)`

  - ### getIndeterminateTintList

    @Nullable public ColorStateList getIndeterminateTintList()
    Returns:
      the tint applied to the indeterminate drawable
    See Also:
      - `setIndeterminateTintList(ColorStateList)`

  - ### setIndeterminateTintBlendMode

    public void setIndeterminateTintBlendMode(@Nullable BlendMode blendMode)
    Specifies the blending mode used to apply the tint specified by `setIndeterminateTintList(ColorStateList)` to the indeterminate drawable. The default mode is `BlendMode.SRC_IN`.
    Parameters:
      `blendMode` - the blending mode used to apply the tint, may be `null` to clear tint
    See Also:
      - `setIndeterminateTintList(ColorStateList)`
      - `Drawable.setTintBlendMode(BlendMode)`

  - ### getIndeterminateTintBlendMode

    @Nullable public BlendMode getIndeterminateTintBlendMode()
    Returns the blending mode used to apply the tint to the indeterminate drawable, if specified.
    Returns:
      the blending mode used to apply the tint to the indeterminate drawable
    See Also:
      - `setIndeterminateTintBlendMode(BlendMode)`

  - ### getProgressDrawable

    public Drawable getProgressDrawable()

    Get the drawable used to draw the progress bar in progress mode.

    Returns:
      a `Drawable` instance
    See Also:
      - `setProgressDrawable(Drawable)`
      - `setIndeterminate(boolean)`

  - ### setProgressDrawable

    public void setProgressDrawable(Drawable d)
    Define the drawable used to draw the progress bar in progress mode.
    Parameters:
      `d` - the new drawable
    See Also:
      - `getProgressDrawable()`
      - `setIndeterminate(boolean)`

  - ### setProgressTintList

    public void setProgressTintList(@Nullable ColorStateList tint)
    Applies a tint to the progress indicator, if one exists, or to the entire progress drawable otherwise. Does not modify the current tint mode, which is
    invalid reference

        PorterDuff.Mode#SRC_IN

    by default.

    The progress indicator should be specified as a layer with id

    invalid reference

        android.R.id#progress

    in a `LayerDrawable` used as the progress drawable.

    Subsequent calls to `setProgressDrawable(Drawable)` will automatically mutate the drawable and apply the specified tint and tint mode using `Drawable.setTintList(ColorStateList)`.

    Parameters:
      `tint` - the tint to apply, may be `null` to clear tint
    See Also:
      - `getProgressTintList()`
      - `Drawable.setTintList(ColorStateList)`

  - ### getProgressTintList

    @Nullable public ColorStateList getProgressTintList()
    Returns the tint applied to the progress drawable, if specified.
    Returns:
      the tint applied to the progress drawable
    See Also:
      - `setProgressTintList(ColorStateList)`

  - ### setProgressTintBlendMode

    public void setProgressTintBlendMode(@Nullable BlendMode blendMode)
    Specifies the blending mode used to apply the tint specified by `setProgressTintList(ColorStateList)`} to the progress indicator. The default mode is
    invalid reference

        PorterDuff.Mode#SRC_IN

    .
    Parameters:
      `blendMode` - the blending mode used to apply the tint, may be `null` to clear tint
    See Also:
      - invalid reference

            #getProgressTintMode()

      - `Drawable.setTintBlendMode(BlendMode)`

  - ### getProgressTintBlendMode

    @Nullable public BlendMode getProgressTintBlendMode()
    Returns the blending mode used to apply the tint to the progress drawable, if specified.
    Returns:
      the blending mode used to apply the tint to the progress drawable
    See Also:
      - `setProgressTintBlendMode(BlendMode)`

  - ### setProgressBackgroundTintList

    public void setProgressBackgroundTintList(@Nullable ColorStateList tint)
    Applies a tint to the progress background, if one exists. Does not modify the current tint mode, which is
    invalid reference

        PorterDuff.Mode#SRC_ATOP

    by default.

    The progress background must be specified as a layer with id

    invalid reference

        android.R.id#background

    in a `LayerDrawable` used as the progress drawable.

    Subsequent calls to `setProgressDrawable(Drawable)` where the drawable contains a progress background will automatically mutate the drawable and apply the specified tint and tint mode using `Drawable.setTintList(ColorStateList)`.

    Parameters:
      `tint` - the tint to apply, may be `null` to clear tint
    See Also:
      - `getProgressBackgroundTintList()`
      - `Drawable.setTintList(ColorStateList)`

  - ### getProgressBackgroundTintList

    @Nullable public ColorStateList getProgressBackgroundTintList()
    Returns the tint applied to the progress background, if specified.
    Returns:
      the tint applied to the progress background
    See Also:
      - `setProgressBackgroundTintList(ColorStateList)`

  - ### setProgressBackgroundTintBlendMode

    public void setProgressBackgroundTintBlendMode(@Nullable BlendMode blendMode)
    Specifies the blending mode used to apply the tint specified by `setProgressBackgroundTintList(ColorStateList)`} to the progress background. The default mode is `BlendMode.SRC_IN`.
    Parameters:
      `blendMode` - the blending mode used to apply the tint, may be `null` to clear tint
    See Also:
      - `setProgressBackgroundTintList(ColorStateList)`
      - `Drawable.setTintBlendMode(BlendMode)`

  - ### getProgressBackgroundTintBlendMode

    @Nullable public BlendMode getProgressBackgroundTintBlendMode()
    Returns:
      the blending mode used to apply the tint to the progress background
    See Also:
      - `setProgressBackgroundTintBlendMode(BlendMode)`

  - ### setSecondaryProgressTintList

    public void setSecondaryProgressTintList(@Nullable ColorStateList tint)
    Applies a tint to the secondary progress indicator, if one exists. Does not modify the current tint mode, which is
    invalid reference

        PorterDuff.Mode#SRC_ATOP

    by default.

    The secondary progress indicator must be specified as a layer with id

    invalid reference

        android.R.id#secondaryProgress

    in a `LayerDrawable` used as the progress drawable.

    Subsequent calls to `setProgressDrawable(Drawable)` where the drawable contains a secondary progress indicator will automatically mutate the drawable and apply the specified tint and tint mode using `Drawable.setTintList(ColorStateList)`.

    Parameters:
      `tint` - the tint to apply, may be `null` to clear tint
    See Also:
      - `getSecondaryProgressTintList()`
      - `Drawable.setTintList(ColorStateList)`

  - ### getSecondaryProgressTintList

    @Nullable public ColorStateList getSecondaryProgressTintList()
    Returns the tint applied to the secondary progress drawable, if specified.
    Returns:
      the tint applied to the secondary progress drawable
    See Also:
      - `setSecondaryProgressTintList(ColorStateList)`

  - ### setSecondaryProgressTintBlendMode

    public void setSecondaryProgressTintBlendMode(@Nullable BlendMode blendMode)
    Specifies the blending mode used to apply the tint specified by `setSecondaryProgressTintList(ColorStateList)`} to the secondary progress indicator. The default mode is
    invalid reference

        PorterDuff.Mode#SRC_ATOP

    .
    Parameters:
      `blendMode` - the blending mode used to apply the tint, may be `null` to clear tint
    See Also:
      - `setSecondaryProgressTintList(ColorStateList)`
      - `Drawable.setTintBlendMode(BlendMode)`

  - ### getSecondaryProgressTintBlendMode

    @Nullable public BlendMode getSecondaryProgressTintBlendMode()
    Returns the blending mode used to apply the tint to the secondary progress drawable, if specified.
    Returns:
      the blending mode used to apply the tint to the secondary progress drawable
    See Also:
      - `setSecondaryProgressTintBlendMode(BlendMode)`

  - ### setProgress

    public void setProgress(int progress)
    Sets the current progress to the specified value. Does not do anything if the progress bar is in indeterminate mode.

    This method will immediately update the visual position of the progress indicator. To animate the visual position to the target value, use `setProgress(int, boolean)`}.

    Parameters:
      `progress` - the new progress, between `getMin()` and `getMax()`
    See Also:
      - `setIndeterminate(boolean)`
      - `isIndeterminate()`
      - `getProgress()`
      - `incrementProgressBy(int)`

  - ### setProgress

    public void setProgress(int progress, boolean animate)
    Sets the current progress to the specified value, optionally animating the visual position between the current and target values.

    Animation does not affect the result of `getProgress()`, which will return the target value immediately after this method is called.

    Parameters:
      `progress` - the new progress value, between `getMin()` and `getMax()`
      `animate` - `true` to animate between the current and target values or `false` to not animate

  - ### setSecondaryProgress

    public void setSecondaryProgress(int secondaryProgress)

    Set the current secondary progress to the specified value. Does not do anything if the progress bar is in indeterminate mode.

    Parameters:
      `secondaryProgress` - the new secondary progress, between `getMin()` and `getMax()`
    See Also:
      - `setIndeterminate(boolean)`
      - `isIndeterminate()`
      - `getSecondaryProgress()`
      - `incrementSecondaryProgressBy(int)`

  - ### getSecondaryProgress

    public int getSecondaryProgress()

    Get the progress bar's current level of secondary progress. Return 0 when the progress bar is in indeterminate mode.

    Returns:
      the current secondary progress, between `getMin()` and `getMax()`
    See Also:
      - `setIndeterminate(boolean)`
      - `isIndeterminate()`
      - `setSecondaryProgress(int)`
      - `setMax(int)`
      - `getMax()`

  - ### getProgress

    public int getProgress()

    Get the progress bar's current level of progress. Return 0 when the progress bar is in indeterminate mode.

    Returns:
      the current progress, between `getMin()` and `getMax()`
    See Also:
      - `setIndeterminate(boolean)`
      - `isIndeterminate()`
      - `setProgress(int)`
      - `setMax(int)`
      - `getMax()`

  - ### incrementProgressBy

    public final void incrementProgressBy(int diff)

    Increase the progress bar's progress by the specified amount.

    Parameters:
      `diff` - the amount by which the progress must be increased
    See Also:
      - `setProgress(int)`

  - ### incrementSecondaryProgressBy

    public final void incrementSecondaryProgressBy(int diff)

    Increase the progress bar's secondary progress by the specified amount.

    Parameters:
      `diff` - the amount by which the secondary progress must be increased
    See Also:
      - `setSecondaryProgress(int)`

  - ### getMin

    public int getMin()

    Return the lower limit of this progress bar's range.

    Returns:
      a positive integer
    See Also:
      - `setMin(int)`
      - `getProgress()`
      - `getSecondaryProgress()`

  - ### getMax

    public int getMax()

    Return the upper limit of this progress bar's range.

    Returns:
      a positive integer
    See Also:
      - `setMax(int)`
      - `getProgress()`
      - `getSecondaryProgress()`

  - ### setMin

    public void setMin(int min)

    Set the lower range of the progress bar to `min`.

    Parameters:
      `min` - the lower range of this progress bar
    See Also:
      - `getMin()`
      - `setProgress(int)`
      - `setSecondaryProgress(int)`

  - ### setMax

    public void setMax(int max)

    Set the upper range of the progress bar `max`.

    Parameters:
      `max` - the upper range of this progress bar
    See Also:
      - `getMax()`
      - `setProgress(int)`
      - `setSecondaryProgress(int)`

  - ### getCurrentDrawable

    @Nullable public Drawable getCurrentDrawable()
    Returns the drawable currently used to draw the progress bar. This will be either `getProgressDrawable()` or `getIndeterminateDrawable()` depending on whether the progress bar is in determinate or indeterminate mode.
    Returns:
      the drawable currently used to draw the progress bar

  - ### verifyDrawable

    protected boolean verifyDrawable(@NonNull Drawable who)
    Description copied from class: `View`
    If your view subclass is displaying its own Drawable objects, it should override this function and return true for any Drawable it is displaying. This allows animations for those drawables to be scheduled.

    Be sure to call through to the super class when overriding this function.

    Overrides:
      `verifyDrawable` in class `View`
    Parameters:
      `who` - The Drawable to verify. Return true if it is one you are displaying, else return the result of calling through to the super class.
    Returns:
      boolean If true then the Drawable is being displayed in the view; else false and it is not allowed to animate.
    See Also:
      - `View.unscheduleDrawable(Drawable)`
      - `View.drawableStateChanged()`

  - ### jumpDrawablesToCurrentState

    public void jumpDrawablesToCurrentState()
    Description copied from class: `View`
    Call `Drawable.jumpToCurrentState()` on all Drawable objects associated with this view.

    Also calls `StateListAnimator.jumpToCurrentState()` if there is a StateListAnimator attached to this view.

    Overrides:
      `jumpDrawablesToCurrentState` in class `View`

  - ### onResolveDrawables

    public void onResolveDrawables(int layoutDirection)
    Description copied from class: `View`
    Called when layout direction has been resolved.

    The default implementation does nothing.

    Overrides:
      `onResolveDrawables` in class `View`
    Parameters:
      `layoutDirection` - The resolved layout direction.
    See Also:
      - `View.LAYOUT_DIRECTION_LTR`
      - `View.LAYOUT_DIRECTION_RTL`

  - ### onDraw

    protected void onDraw(@NonNull Canvas canvas)
    Description copied from class: `View`
    Draw the content of this view, implement this to do your drawing.

    Note that (0, 0) will be the top left of the bounds, and (width, height) will be the bottom right of the bounds.

    Overrides:
      `onDraw` in class `View`
    Parameters:
      `canvas` - the canvas to draw content

  - ### onSizeChanged

    protected void onSizeChanged(int w, int h, int oldw, int oldh)
    Description copied from class: `View`
    Called when width or height changed
    Overrides:
      `onSizeChanged` in class `View`
    Parameters:
      `w` - new width
      `h` - new height
      `oldw` - previous width
      `oldh` - previous height

  - ### drawableStateChanged

    protected void drawableStateChanged()
    Description copied from class: `View`
    This function is called whenever the state of the view changes in such a way that it impacts the state of drawables being shown.

    If the View has a StateListAnimator, it will also be called to run necessary state change animations.

    Be sure to call through to the superclass when overriding this function.

    Overrides:
      `drawableStateChanged` in class `View`
    See Also:
      - `Drawable.setState(int[])`

  - ### drawableHotspotChanged

    public void drawableHotspotChanged(float x, float y)
    Description copied from class: `View`
    This function is called whenever the view hotspot changes and needs to be propagated to drawables or child views managed by the view.

    Dispatching to child views is handled by `View.dispatchDrawableHotspotChanged(float, float)`.

    Be sure to call through to the superclass when overriding this function.

    Overrides:
      `drawableHotspotChanged` in class `View`
    Parameters:
      `x` - hotspot x coordinate
      `y` - hotspot y coordinate