setRadius

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.

Return

A boolean that indicates whether or not the new radius was applied.

Parameters

normalizedRadius

normalized radius in the range of 0-1.

radiusGain

amplification factor of the normalized radius.

alphaGain

amplification factor of the visualizer alpha.

Throws

If the normalized radius is not within the 0-1 range, or the radiusGain/alphaGain are negative.