RiveInitializer

Initializes Rive; needs to be done at startup.

Either call this before the view is laid out:

AppInitializer.getInstance(applicationContext)
.initializeComponent(RiveInitializer::class.java)

or declare a provider in your app's manifest:

<provider
android:name="androidx.startup.InitializationProvider"
android:authorities="${applicationId}.androidx-startup"
android:exported="false"
tools:node="merge">
<meta-data android:name="app.rive.runtime.kotlin.RiveInitializer"
android:value="androidx.startup" />
</provider>

Include this in your dependencies:

implementation "androidx.startup:startup-runtime:1.0.0"

Alternatively, you can call Rive.init(context) once when your app starts up and before Rive is used. In fact, if you want to provide a custom renderer type you'll need to init Rive manually.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open override fun create(context: Context)
Link copied to clipboard
open override fun dependencies(): List<Class<out Initializer<*>>>