SeslProgressBar

open class SeslProgressBar : View

SeslProgressBar is a base widget for visualizing and controlling progress in One UI, supporting both determinate and indeterminate modes, custom shapes, and smooth gradient styling.

Configurable functionalities (via XML attributes and/or public methods):

  • Progress Range:
    • Set minimum and maximum values using setMin, setMax, or the android:min and android:max XML attributes.
  • Progress Values:
  • Indeterminate Mode:
  • Progress Drawable:
  • Tinting:
  • Dimensions &Style:
    • Control size and appearance using android:minWidth, android:maxWidth, android:minHeight, android:maxHeight, and android:style attributes.
  • Accessibility:
    • Supports accessibility events and node info customization for assistive technologies.

SESL9/8.5 Enhancements:

  • Gradient Modes: Introduced MODE_GRADIENT_HORIZONTAL and MODE_GRADIENT_CIRCLE modes for animated linear and circular sweep gradient progress indicators.
  • Gradient Smoothing: Integrates SeslProgressBarGradientSmoother to apply Catmull-Rom cubic spline interpolation over gradient color stops and positions for smoother color transitions.
  • Custom Circle Sizing: Supports XML configuration for stroke width (R.styleable#ProgressBar_seslCircleModeStrokeWidth) and padding (R.styleable#ProgressBar_seslCircleModePadding) when seslUseCustomWidthForCircleMode is enabled.
  • Animated Gradient Shaders: Drives continuous gradient translation and rotation via createGradientProgressAnimator and GradientHorizontalProgressDrawable.

ProgressBar Modes:

See also

Inheritors

Constructors

Link copied to clipboard
constructor(@NonNull context: @NonNull Context)
Create a new progress bar with range 0...100 and initial progress of 0.
constructor(@NonNull context: @NonNull Context, @Nullable attrs: @Nullable AttributeSet)
constructor(@NonNull context: @NonNull Context, @Nullable attrs: @Nullable AttributeSet, defStyleAttr: Int)
constructor(@NonNull context: @NonNull Context, @Nullable attrs: @Nullable AttributeSet, defStyleAttr: Int, defStyleRes: Int)

Types

Link copied to clipboard
annotation class SeekBarMode
Samsung ProgressBar modes

Properties

Link copied to clipboard
val MODE_CIRCLE: Int = 7
Link copied to clipboard
Link copied to clipboard
val MODE_EXPAND: Int = 5
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val MODE_SPLIT: Int = 4
Link copied to clipboard
Link copied to clipboard
val MODE_WARNING: Int = 1

Functions

Link copied to clipboard
Link copied to clipboard
@Nullable
open fun getCurrentDrawable(): @Nullable Drawable
Returns the drawable currently used to draw the progress bar.
Link copied to clipboard
Get the drawable used to draw the progress bar in indeterminate mode.
Link copied to clipboard
@Nullable
open fun getIndeterminateTintList(): @Nullable ColorStateList
Link copied to clipboard
Returns the blending mode used to apply the tint to the indeterminate drawable, if specified.
Link copied to clipboard
Gets the acceleration curve type for the indeterminate animation.
Link copied to clipboard
open fun getMax(): Int
Link copied to clipboard
open fun getMaxHeight(): Int
Link copied to clipboard
open fun getMaxWidth(): Int
Link copied to clipboard
open fun getMin(): Int
Return the upper limit of this progress bar's range.
Link copied to clipboard
open fun getMinHeight(): Int
Link copied to clipboard
open fun getMinWidth(): Int
Link copied to clipboard
Link copied to clipboard
open fun getPaddingLeft(): Int
Link copied to clipboard
open fun getPaddingRight(): Int
Link copied to clipboard
open fun getProgress(): Int
Get the progress bar's current level of progress.
Link copied to clipboard
@Nullable
open fun getProgressBackgroundTintList(): @Nullable ColorStateList
Returns the tint applied to the progress background, if specified.
Link copied to clipboard
Link copied to clipboard
Get the drawable used to draw the progress bar in progress mode.
Link copied to clipboard
@Nullable
open fun getProgressTintList(): @Nullable ColorStateList
Returns the tint applied to the progress drawable, if specified.
Link copied to clipboard
open fun getProgressTintMode(): @Nullable PorterDuff.Mode
Returns the blending mode used to apply the tint to the progress drawable, if specified.
Link copied to clipboard
Get the progress bar's current level of secondary progress.
Link copied to clipboard
@Nullable
open fun getSecondaryProgressTintList(): @Nullable ColorStateList
Returns the tint applied to the secondary progress drawable, if specified.
Link copied to clipboard
Returns the blending mode used to apply the tint to the secondary progress drawable, if specified.
Link copied to clipboard
Increase the progress bar's progress by the specified amount.
Link copied to clipboard
Increase the progress bar's secondary progress by the specified amount.
Link copied to clipboard
open fun invalidateDrawable(@NonNull dr: @NonNull Drawable)
Link copied to clipboard
open fun isAnimating(): Boolean
Returns whether the ProgressBar is animating or not.
Link copied to clipboard
Indicate whether this progress bar is in indeterminate mode.
Link copied to clipboard
Link copied to clipboard
open fun onResolveDrawables(layoutDirection: Int)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun onVisibilityAggregated(isVisible: Boolean)
Link copied to clipboard
open fun onVisualProgressChanged(id: Int, progress: Float)
Called when the visual state of a progress indicator changes.
Link copied to clipboard
open fun postInvalidate()
Link copied to clipboard
open fun requestAnimation(start: Boolean)
Link copied to clipboard
Link copied to clipboard
open fun setIndeterminate(indeterminate: Boolean)
Change the indeterminate mode for this progress bar.
Link copied to clipboard
Define the drawable used to draw the progress bar in indeterminate mode.
Link copied to clipboard
Define the tileable drawable used to draw the progress bar in indeterminate mode.
Link copied to clipboard
open fun setIndeterminateTintList(@Nullable tint: @Nullable ColorStateList)
Applies a tint to the indeterminate drawable.
Link copied to clipboard
open fun setIndeterminateTintMode(tintMode: @Nullable PorterDuff.Mode)
Specifies the blending mode used to apply the tint specified by setIndeterminateTintList to the indeterminate drawable.
Link copied to clipboard
open fun setInterpolator(interpolator: Interpolator)
open fun setInterpolator(context: Context, @InterpolatorRes resID: Int)
Sets the acceleration curve for the indeterminate animation.
Link copied to clipboard
open fun setMax(max: Int)
Set the upper range of the progress bar max.
Link copied to clipboard
open fun setMaxHeight(@Px maxHeight: Int)
Sets the maximum height the progress bar can have.
Link copied to clipboard
open fun setMaxWidth(@Px maxWidth: Int)
Sets the maximum width the progress bar can have.
Link copied to clipboard
open fun setMin(min: Int)
Set the lower range of the progress bar to min.
Link copied to clipboard
open fun setMinHeight(@Px minHeight: Int)
Sets the minimum height the progress bar can have.
Link copied to clipboard
open fun setMinWidth(@Px minWidth: Int)
Sets the minimum width the progress bar can have.
Link copied to clipboard
open fun setMode(mode: Int)
Sets the display mode for this progress bar.
Link copied to clipboard
open fun setProgress(progress: Int)
Sets the current progress to the specified value.
open fun setProgress(progress: Int, animate: Boolean)
Sets the current progress to the specified value, optionally animating the visual position between the current and target values.
Link copied to clipboard
open fun setProgressBackgroundTintList(@Nullable tint: @Nullable ColorStateList)
Applies a tint to the progress background, if one exists.
Link copied to clipboard
open fun setProgressBackgroundTintMode(tintMode: @Nullable PorterDuff.Mode)
Specifies the blending mode used to apply the tint specified by setProgressBackgroundTintList} to the progress background.
Link copied to clipboard
Define the drawable used to draw the progress bar in progress mode.
Link copied to clipboard
Define the tileable drawable used to draw the progress bar in progress mode.
Link copied to clipboard
open fun setProgressTintList(@Nullable tint: @Nullable ColorStateList)
Applies a tint to the progress indicator, if one exists, or to the entire progress drawable otherwise.
Link copied to clipboard
open fun setProgressTintMode(tintMode: @Nullable PorterDuff.Mode)
Specifies the blending mode used to apply the tint specified by setProgressTintList} to the progress indicator.
Link copied to clipboard
open fun setSecondaryProgress(secondaryProgress: Int)
Set the current secondary progress to the specified value.
Link copied to clipboard
open fun setSecondaryProgressTintList(@Nullable tint: @Nullable ColorStateList)
Applies a tint to the secondary progress indicator, if one exists.
Link copied to clipboard
open fun setSecondaryProgressTintMode(tintMode: @Nullable PorterDuff.Mode)
Specifies the blending mode used to apply the tint specified by setSecondaryProgressTintList} to the secondary progress indicator.