setRiveFile

fun setRiveFile(file: File, artboardName: String? = null, animationName: String? = null, stateMachineName: String? = null, autoplay: Boolean = controller.autoplay, autoBind: Boolean = false, fit: Fit = Fit.fromIndex(fitIndexDefault), alignment: Alignment = Alignment.fromIndex(alignmentIndexDefault), loop: Loop = Loop.fromIndex(loopIndexDefault))

Set this view to use the specified Rive file. The file must be initialized outside this scope and the caller is responsible for cleaning up its resources.

Parameters

file

The Rive file to load.

See also

Throws

if artboardName or animationName are set and do not exist in the file.