-
public class LottieImageAssetData class describing an image asset embedded in a Lottie json file.
-
-
Constructor Summary
Constructors Constructor Description LottieImageAsset(int width, int height, String id, String fileName, String dirName)
-
Method Summary
Modifier and Type Method Description intgetWidth()intgetHeight()StringgetId()The reference id in the json file. StringgetFileName()StringgetDirName()BitmapgetBitmap()Returns the bitmap that has been stored for this image asset if one was explicitly set. voidsetBitmap(@Nullable() Bitmap bitmap)Permanently sets the bitmap on this LottieImageAsset. LottieImageAssetcopyWithScale(float scale)Returns a new LottieImageAsset with the same properties as this one but with thedimensions and bitmap scaled. booleanhasBitmap()Returns whether this asset has an embedded Bitmap or whether the fileName is a base64 encoded bitmap. -
-
Method Detail
-
getWidth
int getWidth()
-
getHeight
int getHeight()
-
getFileName
String getFileName()
-
getDirName
String getDirName()
-
getBitmap
@Nullable() Bitmap getBitmap()
Returns the bitmap that has been stored for this image asset if one was explicitly set.
-
setBitmap
void setBitmap(@Nullable() Bitmap bitmap)
Permanently sets the bitmap on this LottieImageAsset. This will:1) Overwrite any existing Bitmaps.2) Apply to *all* animations that use this LottieComposition.If you only want to replace the bitmap for this animation, use dynamic propertieswith IMAGE.
-
copyWithScale
LottieImageAsset copyWithScale(float scale)
Returns a new LottieImageAsset with the same properties as this one but with thedimensions and bitmap scaled.
-
hasBitmap
boolean hasBitmap()
Returns whether this asset has an embedded Bitmap or whether the fileName is a base64 encoded bitmap.
-
-
-
-