Class LottieDrawable
- java.lang.Object
-
- android.graphics.drawable.Drawable
-
- com.airbnb.lottie.LottieDrawable
-
- All Implemented Interfaces:
Animatable,Drawable.Callback
public class LottieDrawable extends Drawable implements Drawable.Callback, Animatable
This can be used to show an lottie animation in any place that would normally take a drawable.- See Also:
- Full Documentation
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceLottieDrawable.RepeatMode-
Nested classes/interfaces inherited from class android.graphics.drawable.Drawable
Drawable.Callback, Drawable.ConstantState
-
-
Field Summary
Fields Modifier and Type Field Description static intINFINITEThis value used used with thesetRepeatCount(int)property to repeat the animation indefinitely.static intRESTARTWhen the animation reaches the end andrepeatCountis INFINITE or a positive value, the animation restarts from the beginning.static intREVERSEWhen the animation reaches the end andrepeatCountis INFINITE or a positive value, the animation reverses direction on every iteration.
-
Constructor Summary
Constructors Constructor Description LottieDrawable()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddAnimatorListener(Animator.AnimatorListener listener)voidaddAnimatorPauseListener(Animator.AnimatorPauseListener listener)voidaddAnimatorUpdateListener(ValueAnimator.AnimatorUpdateListener updateListener)<T> voidaddValueCallback(KeyPath keyPath, T property, LottieValueCallback<T> callback)Add an property callback for the specifiedKeyPath.<T> voidaddValueCallback(KeyPath keyPath, T property, SimpleLottieValueCallback<T> callback)Overload ofaddValueCallback(KeyPath, Object, LottieValueCallback)that takes an interface.voidcancelAnimation()voidclearComposition()voiddisableExtraScaleModeInFitXY()Deprecated.voiddraw(Canvas canvas)voiddraw(Canvas canvas, Matrix matrix)To be used by lottie-compose only.booleanenableMergePathsForKitKatAndAbove()voidenableMergePathsForKitKatAndAbove(boolean enable)Enable this to get merge path support for devices running KitKat (19) and above.voidendAnimation()intgetAlpha()BitmapgetBitmapForId(String id)Returns the bitmap that will be rendered for the given id in the Lottie animation file.booleangetClipToCompositionBounds()Gets whether or not Lottie should clip to the original animation composition bounds.LottieCompositiongetComposition()intgetFrame()Get the currently rendered frame.BitmapgetImageAsset(String id)Deprecated.StringgetImageAssetsFolder()intgetIntrinsicHeight()intgetIntrinsicWidth()LottieImageAssetgetLottieImageAssetForId(String id)Returns theLottieImageAssetthat will be rendered for the given id in the Lottie animation file.booleangetMaintainOriginalImageBounds()When true, dynamically set bitmaps will be drawn with the exact bounds of the original animation, regardless of the bitmap size.floatgetMaxFrame()Returns the maximum frame set bysetMaxFrame(int)orsetMaxProgress(float)floatgetMinFrame()Returns the minimum frame set bysetMinFrame(int)orsetMinProgress(float)intgetOpacity()PerformanceTrackergetPerformanceTracker()floatgetProgress()RenderModegetRenderMode()Returns the actual render mode being used.intgetRepeatCount()Defines how many times the animation should repeat.intgetRepeatMode()Defines what this animation should do when it reaches the end.floatgetSpeed()Returns the current playback speed.TextDelegategetTextDelegate()TypefacegetTypeface(String fontFamily, String style)booleanhasMasks()Returns whether or not any layers in this composition has masks.booleanhasMatte()Returns whether or not any layers in this composition has a matte layer.voidinvalidateDrawable(Drawable who)These Drawable.Callback methods proxy the calls so that this is the drawable that is actually invalidated, not a child one which will not pass the view's validateDrawable check.voidinvalidateSelf()booleanisAnimating()booleanisApplyingOpacityToLayersEnabled()booleanisLooping()booleanisMergePathsEnabledForKitKatAndAbove()booleanisRunning()voidloop(boolean loop)Deprecated.voidpauseAnimation()voidplayAnimation()Plays the animation from the beginning.voidremoveAllAnimatorListeners()voidremoveAllUpdateListeners()voidremoveAnimatorListener(Animator.AnimatorListener listener)voidremoveAnimatorPauseListener(Animator.AnimatorPauseListener listener)voidremoveAnimatorUpdateListener(ValueAnimator.AnimatorUpdateListener updateListener)List<KeyPath>resolveKeyPath(KeyPath keyPath)voidresumeAnimation()Continues playing the animation from its current position.voidreverseAnimationSpeed()Reverses the current animation speed.voidscheduleDrawable(Drawable who, Runnable what, long when)voidsetAlpha(int alpha)voidsetApplyingOpacityToLayersEnabled(boolean isApplyingOpacityToLayersEnabled)Sets whether to apply opacity to the each layer instead of shape.voidsetClipToCompositionBounds(boolean clipToCompositionBounds)Sets whether or not Lottie should clip to the original animation composition bounds.voidsetColorFilter(ColorFilter colorFilter)booleansetComposition(LottieComposition composition)Create a composition withLottieCompositionFactoryvoidsetFontAssetDelegate(FontAssetDelegate assetDelegate)Use this to manually set fonts.voidsetFrame(int frame)Sets the progress to the specified frame.voidsetIgnoreDisabledSystemAnimations(boolean ignore)Allows ignoring system animations settings, therefore allowing animations to run even if they are disabled.voidsetImageAssetDelegate(ImageAssetDelegate assetDelegate)Use this if you can't bundle images with your app.voidsetImagesAssetsFolder(String imageAssetsFolder)If you use image assets, you must explicitly specify the folder in assets/ in which they are located because bodymovin uses the name filenames across all compositions (img_#).voidsetMaintainOriginalImageBounds(boolean maintainOriginalImageBounds)When true, dynamically set bitmaps will be drawn with the exact bounds of the original animation, regardless of the bitmap size.voidsetMaxFrame(int maxFrame)Sets the maximum frame that the animation will end at when playing or looping.voidsetMaxFrame(String markerName)Sets the maximum frame to the start time + duration of the specified marker.voidsetMaxProgress(float maxProgress)Sets the maximum progress that the animation will end at when playing or looping.voidsetMinAndMaxFrame(int minFrame, int maxFrame)voidsetMinAndMaxFrame(String markerName)Sets the minimum and maximum frame to the start time and start time + duration of the specified marker.voidsetMinAndMaxFrame(String startMarkerName, String endMarkerName, boolean playEndMarkerStartFrame)Sets the minimum and maximum frame to the start marker start and the maximum frame to the end marker start.voidsetMinAndMaxProgress(float minProgress, float maxProgress)voidsetMinFrame(int minFrame)Sets the minimum frame that the animation will start from when playing or looping.voidsetMinFrame(String markerName)Sets the minimum frame to the start time of the specified marker.voidsetMinProgress(float minProgress)Sets the minimum progress that the animation will start from when playing or looping.voidsetOutlineMasksAndMattes(boolean outline)Enable this to debug slow animations by outlining masks and mattes.voidsetPerformanceTrackingEnabled(boolean enabled)voidsetProgress(float progress)voidsetRenderMode(RenderMode renderMode)Call this to set whether or not to render with hardware or software acceleration.voidsetRepeatCount(int count)Sets how many times the animation should be repeated.voidsetRepeatMode(int mode)Defines what this animation should do when it reaches the end.voidsetSafeMode(boolean safeMode)If you are experiencing a device specific crash that happens during drawing, you can set this to true for those devices.voidsetSpeed(float speed)Sets the playback speed.voidsetTextDelegate(TextDelegate textDelegate)booleansetVisible(boolean visible, boolean restart)voidstart()voidstop()voidunscheduleDrawable(Drawable who, Runnable what)BitmapupdateBitmap(String id, Bitmap bitmap)Allows you to modify or clear a bitmap that was loaded for an image either automatically throughsetImagesAssetsFolder(String)or with anImageAssetDelegate.booleanuseTextGlyphs()-
Methods inherited from class android.graphics.drawable.Drawable
applyTheme, canApplyTheme, clearColorFilter, copyBounds, copyBounds, createFromPath, createFromResourceStream, createFromResourceStream, createFromStream, createFromXml, createFromXml, createFromXmlInner, createFromXmlInner, getBounds, getCallback, getChangingConfigurations, getColorFilter, getConstantState, getCurrent, getDirtyBounds, getHotspotBounds, getLayoutDirection, getLevel, getMinimumHeight, getMinimumWidth, getOpticalInsets, getOutline, getPadding, getState, getTransparentRegion, hasFocusStateSpecified, inflate, inflate, isAutoMirrored, isFilterBitmap, isProjected, isStateful, isVisible, jumpToCurrentState, mutate, onBoundsChange, onLayoutDirectionChanged, onLevelChange, onStateChange, resolveOpacity, scheduleSelf, setAutoMirrored, setBounds, setBounds, setCallback, setChangingConfigurations, setColorFilter, setDither, setFilterBitmap, setHotspot, setHotspotBounds, setLayoutDirection, setLevel, setState, setTint, setTintBlendMode, setTintList, setTintMode, unscheduleSelf
-
-
-
-
Field Detail
-
RESTART
public static final int RESTART
When the animation reaches the end andrepeatCountis INFINITE or a positive value, the animation restarts from the beginning.- See Also:
- Constant Field Values
-
REVERSE
public static final int REVERSE
When the animation reaches the end andrepeatCountis INFINITE or a positive value, the animation reverses direction on every iteration.- See Also:
- Constant Field Values
-
INFINITE
public static final int INFINITE
This value used used with thesetRepeatCount(int)property to repeat the animation indefinitely.- See Also:
- Constant Field Values
-
-
Method Detail
-
hasMasks
public boolean hasMasks()
Returns whether or not any layers in this composition has masks.
-
hasMatte
public boolean hasMatte()
Returns whether or not any layers in this composition has a matte layer.
-
enableMergePathsForKitKatAndAbove
public boolean enableMergePathsForKitKatAndAbove()
-
enableMergePathsForKitKatAndAbove
public void enableMergePathsForKitKatAndAbove(boolean enable)
Enable this to get merge path support for devices running KitKat (19) and above.Merge paths currently don't work if the the operand shape is entirely contained within the first shape. If you need to cut out one shape from another shape, use an even-odd fill type instead of using merge paths.
-
isMergePathsEnabledForKitKatAndAbove
public boolean isMergePathsEnabledForKitKatAndAbove()
-
setClipToCompositionBounds
public void setClipToCompositionBounds(boolean clipToCompositionBounds)
Sets whether or not Lottie should clip to the original animation composition bounds. Defaults to true.
-
getClipToCompositionBounds
public boolean getClipToCompositionBounds()
Gets whether or not Lottie should clip to the original animation composition bounds. Defaults to true.
-
setImagesAssetsFolder
public void setImagesAssetsFolder(@Nullable String imageAssetsFolder)If you use image assets, you must explicitly specify the folder in assets/ in which they are located because bodymovin uses the name filenames across all compositions (img_#). Do NOT rename the images themselves.If your images are located in src/main/assets/airbnb_loader/ then call `setImageAssetsFolder("airbnb_loader/");`.
Be wary if you are using many images, however. Lottie is designed to work with vector shapes from After Effects. If your images look like they could be represented with vector shapes, see if it is possible to convert them to shape layers and re-export your animation. Check the documentation at http://airbnb.io/lottie for more information about importing shapes from Sketch or Illustrator to avoid this.
-
getImageAssetsFolder
@Nullable public String getImageAssetsFolder()
-
setMaintainOriginalImageBounds
public void setMaintainOriginalImageBounds(boolean maintainOriginalImageBounds)
When true, dynamically set bitmaps will be drawn with the exact bounds of the original animation, regardless of the bitmap size. When false, dynamically set bitmaps will be drawn at the top left of the original image but with its own bounds.Defaults to false.
-
getMaintainOriginalImageBounds
public boolean getMaintainOriginalImageBounds()
When true, dynamically set bitmaps will be drawn with the exact bounds of the original animation, regardless of the bitmap size. When false, dynamically set bitmaps will be drawn at the top left of the original image but with its own bounds.Defaults to false.
-
setComposition
public boolean setComposition(LottieComposition composition)
Create a composition withLottieCompositionFactory- Returns:
- True if the composition is different from the previously set composition, false otherwise.
-
setRenderMode
public void setRenderMode(RenderMode renderMode)
Call this to set whether or not to render with hardware or software acceleration. Lottie defaults to Automatic which will use hardware acceleration unless: 1) There are dash paths and the device is pre-Pie. 2) There are more than 4 masks and mattes and the device is pre-Pie. Hardware acceleration is generally faster for those devices unless there are many large mattes and masks in which case there is a lot of GPU uploadTexture thrashing which makes it much slower.In most cases, hardware rendering will be faster, even if you have mattes and masks. However, if you have multiple mattes and masks (especially large ones), you should test both render modes. You should also test on pre-Pie and Pie+ devices because the underlying rendering engine changed significantly.
- See Also:
- Android Hardware Acceleration
-
getRenderMode
public RenderMode getRenderMode()
Returns the actual render mode being used. It will always beRenderMode.HARDWAREorRenderMode.SOFTWARE. When the render mode is set to AUTOMATIC, the value will be derived fromRenderMode.useSoftwareRendering(int, boolean, int).
-
setPerformanceTrackingEnabled
public void setPerformanceTrackingEnabled(boolean enabled)
-
setOutlineMasksAndMattes
public void setOutlineMasksAndMattes(boolean outline)
Enable this to debug slow animations by outlining masks and mattes. The performance overhead of the masks and mattes will be proportional to the surface area of all of the masks/mattes combined.DO NOT leave this enabled in production.
-
getPerformanceTracker
@Nullable public PerformanceTracker getPerformanceTracker()
-
setApplyingOpacityToLayersEnabled
public void setApplyingOpacityToLayersEnabled(boolean isApplyingOpacityToLayersEnabled)
Sets whether to apply opacity to the each layer instead of shape.Opacity is normally applied directly to a shape. In cases where translucent shapes overlap, applying opacity to a layer will be more accurate at the expense of performance.
The default value is false.
Note: This process is very expensive. The performance impact will be reduced when hardware acceleration is enabled.
-
disableExtraScaleModeInFitXY
@Deprecated public void disableExtraScaleModeInFitXY()
Deprecated.This API no longer has any effect.
-
isApplyingOpacityToLayersEnabled
public boolean isApplyingOpacityToLayersEnabled()
-
clearComposition
public void clearComposition()
-
setSafeMode
public void setSafeMode(boolean safeMode)
If you are experiencing a device specific crash that happens during drawing, you can set this to true for those devices. If set to true, draw will be wrapped with a try/catch which will cause Lottie to render an empty frame rather than crash your app.Ideally, you will never need this and the vast majority of apps and animations won't. However, you may use this for very specific cases if absolutely necessary.
-
invalidateSelf
public void invalidateSelf()
- Overrides:
invalidateSelfin classDrawable
-
setAlpha
public void setAlpha(@IntRange(from=0L,to=255L) int alpha)
-
setColorFilter
public void setColorFilter(@Nullable ColorFilter colorFilter)- Specified by:
setColorFilterin classDrawable
-
getOpacity
public int getOpacity()
- Specified by:
getOpacityin classDrawable
-
start
@MainThread public void start()
- Specified by:
startin interfaceAnimatable
-
stop
@MainThread public void stop()
- Specified by:
stopin interfaceAnimatable
-
isRunning
public boolean isRunning()
- Specified by:
isRunningin interfaceAnimatable
-
playAnimation
@MainThread public void playAnimation()
Plays the animation from the beginning. If speed is < 0, it will start at the end and play towards the beginning
-
endAnimation
@MainThread public void endAnimation()
-
resumeAnimation
@MainThread public void resumeAnimation()
Continues playing the animation from its current position. If speed < 0, it will play backwards from the current position.
-
setMinFrame
public void setMinFrame(int minFrame)
Sets the minimum frame that the animation will start from when playing or looping.
-
getMinFrame
public float getMinFrame()
Returns the minimum frame set bysetMinFrame(int)orsetMinProgress(float)
-
setMinProgress
public void setMinProgress(float minProgress)
Sets the minimum progress that the animation will start from when playing or looping.
-
setMaxFrame
public void setMaxFrame(int maxFrame)
Sets the maximum frame that the animation will end at when playing or looping.The value will be clamped to the composition bounds. For example, setting Integer.MAX_VALUE would result in the same thing as composition.endFrame.
-
getMaxFrame
public float getMaxFrame()
Returns the maximum frame set bysetMaxFrame(int)orsetMaxProgress(float)
-
setMaxProgress
public void setMaxProgress(@FloatRange(from=0.0,to=1.0) float maxProgress)Sets the maximum progress that the animation will end at when playing or looping.
-
setMinFrame
public void setMinFrame(String markerName)
Sets the minimum frame to the start time of the specified marker.- Throws:
IllegalArgumentException- if the marker is not found.
-
setMaxFrame
public void setMaxFrame(String markerName)
Sets the maximum frame to the start time + duration of the specified marker.- Throws:
IllegalArgumentException- if the marker is not found.
-
setMinAndMaxFrame
public void setMinAndMaxFrame(String markerName)
Sets the minimum and maximum frame to the start time and start time + duration of the specified marker.- Throws:
IllegalArgumentException- if the marker is not found.
-
setMinAndMaxFrame
public void setMinAndMaxFrame(String startMarkerName, String endMarkerName, boolean playEndMarkerStartFrame)
Sets the minimum and maximum frame to the start marker start and the maximum frame to the end marker start. playEndMarkerStartFrame determines whether or not to play the frame that the end marker is on. If the end marker represents the end of the section that you want, it should be true. If the marker represents the beginning of the next section, it should be false.- Throws:
IllegalArgumentException- if either marker is not found.
-
setMinAndMaxFrame
public void setMinAndMaxFrame(int minFrame, int maxFrame)- See Also:
setMinFrame(int),setMaxFrame(int)
-
setMinAndMaxProgress
public void setMinAndMaxProgress(@FloatRange(from=0.0,to=1.0) float minProgress, @FloatRange(from=0.0,to=1.0) float maxProgress)- See Also:
setMinProgress(float),setMaxProgress(float)
-
reverseAnimationSpeed
public void reverseAnimationSpeed()
Reverses the current animation speed. This does NOT play the animation.- See Also:
setSpeed(float),playAnimation(),resumeAnimation()
-
setSpeed
public void setSpeed(float speed)
Sets the playback speed. If speed < 0, the animation will play backwards.
-
getSpeed
public float getSpeed()
Returns the current playback speed. This will be < 0 if the animation is playing backwards.
-
addAnimatorUpdateListener
public void addAnimatorUpdateListener(ValueAnimator.AnimatorUpdateListener updateListener)
-
removeAnimatorUpdateListener
public void removeAnimatorUpdateListener(ValueAnimator.AnimatorUpdateListener updateListener)
-
removeAllUpdateListeners
public void removeAllUpdateListeners()
-
addAnimatorListener
public void addAnimatorListener(Animator.AnimatorListener listener)
-
removeAnimatorListener
public void removeAnimatorListener(Animator.AnimatorListener listener)
-
removeAllAnimatorListeners
public void removeAllAnimatorListeners()
-
addAnimatorPauseListener
@RequiresApi(api=19) public void addAnimatorPauseListener(Animator.AnimatorPauseListener listener)
-
removeAnimatorPauseListener
@RequiresApi(api=19) public void removeAnimatorPauseListener(Animator.AnimatorPauseListener listener)
-
setFrame
public void setFrame(int frame)
Sets the progress to the specified frame. If the composition isn't set yet, the progress will be set to the frame when it is.
-
getFrame
public int getFrame()
Get the currently rendered frame.
-
setProgress
public void setProgress(@FloatRange(from=0.0,to=1.0) float progress)
-
loop
@Deprecated public void loop(boolean loop)
Deprecated.- See Also:
setRepeatCount(int)
-
setRepeatMode
public void setRepeatMode(int mode)
-
getRepeatMode
public int getRepeatMode()
Defines what this animation should do when it reaches the end.
-
setRepeatCount
public void setRepeatCount(int count)
Sets how many times the animation should be repeated. If the repeat count is 0, the animation is never repeated. If the repeat count is greater than 0 orINFINITE, the repeat mode will be taken into account. The repeat count is 0 by default.- Parameters:
count- the number of times the animation should be repeated
-
getRepeatCount
public int getRepeatCount()
Defines how many times the animation should repeat. The default value is 0.- Returns:
- the number of times the animation should repeat, or
INFINITE
-
isLooping
public boolean isLooping()
-
isAnimating
public boolean isAnimating()
-
setIgnoreDisabledSystemAnimations
public void setIgnoreDisabledSystemAnimations(boolean ignore)
Allows ignoring system animations settings, therefore allowing animations to run even if they are disabled.Defaults to false.
- Parameters:
ignore- if true animations will run even when they are disabled in the system settings.
-
setImageAssetDelegate
public void setImageAssetDelegate(ImageAssetDelegate assetDelegate)
Use this if you can't bundle images with your app. This may be useful if you download the animations from the network or have the images saved to an SD Card. In that case, Lottie will defer the loading of the bitmap to this delegate.Be wary if you are using many images, however. Lottie is designed to work with vector shapes from After Effects. If your images look like they could be represented with vector shapes, see if it is possible to convert them to shape layers and re-export your animation. Check the documentation at http://airbnb.io/lottie for more information about importing shapes from Sketch or Illustrator to avoid this.
-
setFontAssetDelegate
public void setFontAssetDelegate(FontAssetDelegate assetDelegate)
Use this to manually set fonts.
-
setTextDelegate
public void setTextDelegate(TextDelegate textDelegate)
-
getTextDelegate
@Nullable public TextDelegate getTextDelegate()
-
useTextGlyphs
public boolean useTextGlyphs()
-
getComposition
public LottieComposition getComposition()
-
cancelAnimation
public void cancelAnimation()
-
pauseAnimation
public void pauseAnimation()
-
getProgress
@FloatRange(from=0.0, to=1.0) public float getProgress()
-
getIntrinsicWidth
public int getIntrinsicWidth()
- Overrides:
getIntrinsicWidthin classDrawable
-
getIntrinsicHeight
public int getIntrinsicHeight()
- Overrides:
getIntrinsicHeightin classDrawable
-
resolveKeyPath
public List<KeyPath> resolveKeyPath(KeyPath keyPath)
Takes aKeyPath, potentially with wildcards or globstars and resolve it to a list of zero or more actualKeypathsthat exist in the current animation.If you want to set value callbacks for any of these values, it is recommend to use the returned
KeyPathobjects because they will be internally resolved to their content and won't trigger a tree walk of the animation contents when applied.
-
addValueCallback
public <T> void addValueCallback(KeyPath keyPath, T property, @Nullable LottieValueCallback<T> callback)
Add an property callback for the specifiedKeyPath. ThisKeyPathcan resolve to multiple contents. In that case, the callback's value will apply to all of them.Internally, this will check if the
KeyPathhas already been resolved withresolveKeyPath(KeyPath)and will resolve it if it hasn't.
-
addValueCallback
public <T> void addValueCallback(KeyPath keyPath, T property, SimpleLottieValueCallback<T> callback)
Overload ofaddValueCallback(KeyPath, Object, LottieValueCallback)that takes an interface. This allows you to use a single abstract method code block in Kotlin such as: drawable.addValueCallback(yourKeyPath, LottieProperty.COLOR) { yourColor }
-
updateBitmap
@Nullable public Bitmap updateBitmap(String id, @Nullable Bitmap bitmap)
Allows you to modify or clear a bitmap that was loaded for an image either automatically throughsetImagesAssetsFolder(String)or with anImageAssetDelegate.- Returns:
- the previous Bitmap or null.
-
getImageAsset
@Nullable @Deprecated public Bitmap getImageAsset(String id)
Deprecated.
-
getBitmapForId
@Nullable public Bitmap getBitmapForId(String id)
Returns the bitmap that will be rendered for the given id in the Lottie animation file. The id is the asset reference id stored in the "id" property of each object in the "assets" array.The returned bitmap could be from: * Embedded in the animation file as a base64 string. * In the same directory as the animation file. * In the same zip file as the animation file. * Returned from an
ImageAssetDelegate. or null if the image doesn't exist from any of those places.
-
getLottieImageAssetForId
@Nullable public LottieImageAsset getLottieImageAssetForId(String id)
Returns theLottieImageAssetthat will be rendered for the given id in the Lottie animation file. The id is the asset reference id stored in the "id" property of each object in the "assets" array.The returned bitmap could be from: * Embedded in the animation file as a base64 string. * In the same directory as the animation file. * In the same zip file as the animation file. * Returned from an
ImageAssetDelegate. or null if the image doesn't exist from any of those places.
-
setVisible
public boolean setVisible(boolean visible, boolean restart)- Overrides:
setVisiblein classDrawable
-
invalidateDrawable
public void invalidateDrawable(@NonNull Drawable who)These Drawable.Callback methods proxy the calls so that this is the drawable that is actually invalidated, not a child one which will not pass the view's validateDrawable check.- Specified by:
invalidateDrawablein interfaceDrawable.Callback
-
scheduleDrawable
public void scheduleDrawable(@NonNull Drawable who, @NonNull Runnable what, long when)- Specified by:
scheduleDrawablein interfaceDrawable.Callback
-
unscheduleDrawable
public void unscheduleDrawable(@NonNull Drawable who, @NonNull Runnable what)- Specified by:
unscheduleDrawablein interfaceDrawable.Callback
-
-