Annotate fetchBitmap as
According to the example in fetchBitmap() can return null and Lottie will keep asking until a non-null Bitmap is returned.
package com.airbnb.lottie;
import android.graphics.Bitmap;
+import androidx.annotation.Nullable;
/**
* Delegate to handle the loading of bitmaps that are not packaged in the assets of your app.
@@ -8,5 +9,5 @@ import android.graphics.Bitmap;
* @see LottieDrawable#setImageAssetDelegate(ImageAssetDelegate)
*/
public interface ImageAssetDelegate {
- Bitmap fetchBitmap(LottieImageAsset asset);
+ @Nullable Bitmap fetchBitmap(LottieImageAsset asset);
}
