Package 

Class RiveInitializer

  • All Implemented Interfaces:
    androidx.startup.Initializer

    
    public final class RiveInitializer
     implements Initializer<Unit>
                        

    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.

    • Method Summary

      Modifier and Type Method Description
      Unit create(Context context)
      List<Class<out Initializer<?>>> dependencies()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait