| java.lang.Object | ||
| ↳ | com.facebook.fresco.animation.backend.AnimationBackendDelegate<T extends com.facebook.fresco.animation.backend.AnimationBackend> | |
| ↳ | com.facebook.fresco.animation.backend.AnimationBackendDelegateWithInactivityCheck<T extends com.facebook.fresco.animation.backend.AnimationBackend> | |
Animation backend delegate for animation backends that implement AnimationBackendDelegateWithInactivityCheck.InactivityListener.
After a certain inactivity period (default = #INACTIVITY_THRESHOLD_MS, onInactive() will be called.
This can for example be used to drop caches if needed.
New instances can be created with createForBackend(AnimationBackend, MonotonicClock, ScheduledExecutorService).
| Nested Classes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| interface | AnimationBackendDelegateWithInactivityCheck.InactivityListener | ||||||||||
|
[Expand]
Inherited Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From interface
com.facebook.fresco.animation.backend.AnimationBackend
| |||||||||||
From interface
com.facebook.fresco.animation.backend.AnimationInformation
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| static <T extends AnimationBackend & AnimationBackendDelegateWithInactivityCheck.InactivityListener> AnimationBackendDelegate<T> | createForBackend(T backend, MonotonicClock monotonicClock, ScheduledExecutorService scheduledExecutorServiceForUiThread) | ||||||||||
| static <T extends AnimationBackend> AnimationBackendDelegate<T> | createForBackend(T backend, AnimationBackendDelegateWithInactivityCheck.InactivityListener inactivityListener, MonotonicClock monotonicClock, ScheduledExecutorService scheduledExecutorServiceForUiThread) | ||||||||||
| boolean |
drawFrame(Drawable parent, Canvas canvas, int frameNumber)
Draw the frame for the given frame number on the canvas.
| ||||||||||
| long | getInactivityCheckPollingTimeMs() | ||||||||||
| long | getInactivityThresholdMs() | ||||||||||
| void | setInactivityCheckPollingTimeMs(long inactivityCheckPollingTimeMs) | ||||||||||
| void | setInactivityListener(AnimationBackendDelegateWithInactivityCheck.InactivityListener inactivityListener) | ||||||||||
| void | setInactivityThresholdMs(long inactivityThresholdMs) | ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.facebook.fresco.animation.backend.AnimationBackendDelegate
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
com.facebook.fresco.animation.backend.AnimationBackend
| |||||||||||
From interface
com.facebook.fresco.animation.backend.AnimationInformation
| |||||||||||
Draw the frame for the given frame number on the canvas.
| parent | the parent that draws the frame |
|---|---|
| canvas | the canvas to draw an |
| frameNumber | the frame number of the frame to draw |