Fallback Asset Loader
The default asset loader used by RiveAnimationView when loading assets. This allows for setting up cascading asset loaders which may be useful when each represents a different source or policy, e.g. a memory cache, local storage, and network.
Parameters
The application context.
Whether to load assets from Rive's CDN. This appends a CDNAssetLoader to the list of loaders if true (default), allowing loading of assets marked as "Hosted" in the Rive editor.
An optional initial FileAssetLoader to add to the list of loaders.
Properties
Functions
Increments the references for this counter. Cannot be used for initialization - use refs.incrementAndGet instead.
Add a FileAssetLoader to the end of the list of loaders, i.e. lowest priority. Note that if the constructor parameter loadCDNAssets is true (default) a CDNAssetLoader will be the current last loader, and this will be added after it.
Attempts to load the asset using each loader in order until one succeeds or all refuse.
Add a FileAssetLoader to the start of the list of loaders, i.e. highest priority.
Decrements the reference counter.