public interface GfycatPlayer
| Modifier and Type | Method and Description |
|---|---|
android.view.View |
getView()
Returns view that represents this player.
|
void |
pause()
Pause animation playback.
|
void |
play()
Start animation playback.
|
void |
release()
You MUST call this method when @{link
GfycatPlayer is no longer needed in order to release resources and avoid memory leak. |
void |
setOnStartAnimationListener(java.lang.Runnable onStartAnimationListener)
Set callback that would be invoked on first animation start.
|
void |
setScaleType(android.widget.ImageView.ScaleType scaleType)
Set scale type, see #ImageView.ScaleType
|
void |
setShouldLoadPreview(boolean shouldLoadPreview)
If set to true preview image will be loaded and displayed while larger animated file is being loaded.
|
void |
setupGfycat(Gfycat gfycat) |
void |
setupGfycat(Gfycat gfycat,
ContextDetails contextDetails) |
void |
setupPreview(android.graphics.drawable.Drawable drawable,
boolean animate)
Set preview manually by calling this method.
|
void setShouldLoadPreview(boolean shouldLoadPreview)
Default value is false.
IMPORTANT: Call this method before setupGfycat(Gfycat), otherwise preview image will not be loaded.
Note:
Use FrameSequenceView#setupPreview(Drawable, boolean) instead if you need to display your own preview.
You can also download preview image manually and set it as a preview with FrameSequenceView#setupPreview(Drawable, boolean)
if you already have one, or there are other needs.
void setupPreview(android.graphics.drawable.Drawable drawable,
boolean animate)
Note: If setShouldLoadPreview(boolean) is set to true then preview image will be replaced by the one loaded from FrameSequenceSource#loadPoster().
drawable - to use as preview, until actual animation will be loaded is being loaded.animate - set to true if transition animation needed.void setupGfycat(Gfycat gfycat,
ContextDetails contextDetails)
gfycat - contextDetails - void setupGfycat(Gfycat gfycat)
void play()
void pause()
void setScaleType(android.widget.ImageView.ScaleType scaleType)
void release()
GfycatPlayer is no longer needed in order to release resources and avoid memory leak.
Note: We are working on automatic resource release encapsulation. This method will be marked as Deprecated when done.
void setOnStartAnimationListener(java.lang.Runnable onStartAnimationListener)
android.view.View getView()