SeslCircularSeekBarView

A custom view that displays a circular seek bar with two pointers and a progress arc. Users can interact with the pointers to set a range, and the progress arc visually represents this range. It also supports a "sleep goal wheel" feature, which is an additional arc indicating a target range.

This view allows customization of various visual aspects such as colors, stroke widths, and pointer styles. It provides callbacks for tracking progress changes and touch events.

Key features:

  • Two draggable pointers (bedtime and wakeup time).
  • A progress arc connecting the two pointers.
  • Customizable colors for pointers, progress, and background circle.
  • Optional "sleep goal wheel" to display a target range.
  • Haptic feedback for certain interactions.
  • Callbacks for progress changes and touch events via OnCircularSeekBarChangeListener.
  • Reveal animation for the progress arc.

Usage typically involves:

  1. Adding SeslCircularSeekBarView to your layout XML.
  2. Setting attributes in XML or programmatically to customize its appearance.
  3. Implementing OnCircularSeekBarChangeListener to respond to user interactions.
  4. Optionally, using methods like setSleepGoalWheel to enable and configure the sleep goal wheel.

Constructors

Link copied to clipboard
constructor(@NonNull context: Context)
constructor(@NonNull context: Context, @Nullable attrs: AttributeSet)
constructor(@NonNull context: Context, @Nullable attrs: AttributeSet, defStyleAttr: Int)

Types

Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun onDraw(@NonNull canvas: Canvas)
Link copied to clipboard
fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun setSleepGoalWheel(startAngle: Float, endAngle: Float)
Link copied to clipboard