setAlpha

open fun setAlpha(@FloatRange(from = 0.0, to = 1.0) alpha: Float)(source)

Sets the opacity of the protection to a value from 0 to 1, where 0 means the protection is completely transparent and 1 means the protection is completely opaque.

Parameters

alpha

The opacity of the protection.

Throws

if the given alpha is not in a range of [0, 1].