java.lang.Object | |
↳ | com.facebook.imagepipeline.animated.util.AnimatedDrawableUtil |
Utility methods for AnimatedDrawable.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
AnimatedDrawableUtil() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
fixFrameDurations(int[] frameDurationMs)
Adjusts the frame duration array to respect logic for minimum frame duration time.
| ||||||||||
int |
getFrameForTimestampMs(int[] frameTimestampsMs, int timestampMs)
Gets the frame index for specified timestamp.
| ||||||||||
int[] |
getFrameTimeStampsFromDurations(int[] frameDurationsMs)
Given an array of frame durations, generate an array of timestamps corresponding to when each
frame beings.
| ||||||||||
int | getSizeOfBitmap(Bitmap bitmap) | ||||||||||
int |
getTotalDurationFromFrameDurations(int[] frameDurationMs)
Gets the total duration of an image by summing up the duration of the frames.
| ||||||||||
static boolean |
isOutsideRange(int startFrame, int endFrame, int frameNumber)
Checks whether the specified frame number is outside the range inclusive of both start and end.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Adjusts the frame duration array to respect logic for minimum frame duration time.
frameDurationMs | the frame duration array |
---|
Given an array of frame durations, generate an array of timestamps corresponding to when each frame beings.
frameDurationsMs | an array of frame durations |
---|
Gets the total duration of an image by summing up the duration of the frames.
frameDurationMs | the frame duration array |
---|
Checks whether the specified frame number is outside the range inclusive of both start and end. If start <= end, start is within, end is within, and everything in between is within. If start > end, start is within, end is within, everything less than start is within and everything greater than end is within. This behavior is useful for handling the wrapping case.
startFrame | the start frame |
---|---|
endFrame | the end frame |
frameNumber | the frame number |