Package com.airbnb.lottie
Class LottieConfig.Builder
- java.lang.Object
-
- com.airbnb.lottie.LottieConfig.Builder
-
- Enclosing class:
- LottieConfig
public static final class LottieConfig.Builder extends Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LottieConfigbuild()LottieConfig.BuildersetEnableSystraceMarkers(boolean enable)Enable this if you want to run systrace to debug the performance of animations.LottieConfig.BuildersetNetworkCacheDir(File file)Provide your own network cache directory.LottieConfig.BuildersetNetworkCacheProvider(LottieNetworkCacheProvider fileCacheProvider)Provide your own network cache provider.LottieConfig.BuildersetNetworkFetcher(LottieNetworkFetcher fetcher)Lottie has a default network fetching stack built onHttpURLConnection.
-
-
-
Method Detail
-
setNetworkFetcher
@NonNull public LottieConfig.Builder setNetworkFetcher(@NonNull LottieNetworkFetcher fetcher)
Lottie has a default network fetching stack built onHttpURLConnection. However, if you would like to hook into your own network stack for performance, caching, or analytics, you may replace the internal stack with your own.
-
setNetworkCacheDir
@NonNull public LottieConfig.Builder setNetworkCacheDir(@NonNull File file)
Provide your own network cache directory. By default, animations will be saved in your application's cacheDir/lottie_network_cache.
-
setNetworkCacheProvider
@NonNull public LottieConfig.Builder setNetworkCacheProvider(@NonNull LottieNetworkCacheProvider fileCacheProvider)
Provide your own network cache provider. By default, animations will be saved in your application's cacheDir/lottie_network_cache.
-
setEnableSystraceMarkers
@NonNull public LottieConfig.Builder setEnableSystraceMarkers(boolean enable)
Enable this if you want to run systrace to debug the performance of animations. DO NOT leave this enabled in production. The overhead is low but non-zero.- See Also:
- Systrace Docs
-
build
@NonNull public LottieConfig build()
-
-