VisualizerView

class VisualizerView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr: Int = 0, @StyleRes defStyleRes: Int = 0) : View

A view to help with the visualization of constant changes in the value of a normalized scale translated to changes in the alpha and the radius of a circle of this view.

Constructors

Link copied to clipboard
constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr: Int = 0, @StyleRes defStyleRes: Int = 0)

Functions

Link copied to clipboard
fun reset()

Resets the visualizer alpha and radius to the default values. This resets the view regardless of the forceVisualization setting.

Link copied to clipboard
fun setRadius(normalizedRadius: Float, radiusGain: Float = 2.5f, alphaGain: Float = 5.0f): Boolean

Sets a new normalized radius value that the view can use and animate to or skips the new radius if forceVisualization was set to false and the visualizer is busy or the value change is negligible.

Properties

Link copied to clipboard

Equivalent to providing the app:visualizerViewCircleColor attribute in the layout xml file.

Link copied to clipboard
@get:JvmName(name = "shouldForceVisualization")
var forceVisualization: Boolean

Equivalent to providing the app:visualizerViewForceVisualization attribute in the layout xml file.