类 AvifSequenceDrawable
- java.lang.Object
-
- android.graphics.drawable.Drawable
-
- com.tencent.libavif.AvifSequenceDrawable
-
- 所有已实现的接口:
android.graphics.drawable.Animatable
public class AvifSequenceDrawable extends android.graphics.drawable.Drawable implements android.graphics.drawable.Animatable
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 static interfaceAvifSequenceDrawable.BitmapProviderstatic interfaceAvifSequenceDrawable.OnFinishedListener
-
字段概要
字段 修饰符和类型 字段 说明 static booleanDEBUGstatic intLOOP_DEFAULTUse loop count stored in source data, or LOOP_ONCE if not present.static intLOOP_FINITELoop a finite number of times, which can be set using setLoopCount.static intLOOP_INFLoop continuously.
-
构造器概要
构造器 构造器 说明 AvifSequenceDrawable(com.tencent.libqcloudavif.AvifDecoder avifDecoder, long bytesLength)AvifSequenceDrawable(com.tencent.libqcloudavif.AvifDecoder avifDecoder, long bytesLength, AvifSequenceDrawable.BitmapProvider bitmapProvider)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voiddestroy()Marks the drawable as permanently recycled (and thus unusable), and releases any owned Bitmaps drawable to its BitmapProvider, if attached.voiddraw(android.graphics.Canvas canvas)intgetIntrinsicHeight()intgetIntrinsicWidth()intgetOpacity()intgetSize()voidinvalidateSelf()booleanisDestroyed()booleanisRunning()voidsetAlpha(int alpha)voidsetColorFilter(android.graphics.ColorFilter colorFilter)voidsetFilterBitmap(boolean filter)voidsetLoopBehavior(int loopBehavior)Define looping behavior of frame sequence.voidsetLoopCount(int loopCount)Set the number of loops in LOOP_FINITE mode.voidsetOnFinishedListener(AvifSequenceDrawable.OnFinishedListener onFinishedListener)Register a callback to be invoked when a FrameSequenceDrawable finishes looping.booleansetVisible(boolean visible, boolean restart)voidstart()voidstop()-
从类继承的方法 android.graphics.drawable.Drawable
applyTheme, canApplyTheme, clearColorFilter, copyBounds, copyBounds, createFromPath, createFromResourceStream, createFromResourceStream, createFromStream, createFromXml, createFromXml, createFromXmlInner, createFromXmlInner, getAlpha, 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, setHotspot, setHotspotBounds, setLayoutDirection, setLevel, setState, setTint, setTintBlendMode, setTintList, setTintMode, unscheduleSelf
-
-
-
-
字段详细资料
-
DEBUG
public static final boolean DEBUG
- 另请参阅:
- 常量字段值
-
LOOP_FINITE
public static final int LOOP_FINITE
Loop a finite number of times, which can be set using setLoopCount. Default to loop once.- 另请参阅:
- 常量字段值
-
LOOP_INF
public static final int LOOP_INF
Loop continuously. The OnFinishedListener will never be called.- 另请参阅:
- 常量字段值
-
LOOP_DEFAULT
public static final int LOOP_DEFAULT
Use loop count stored in source data, or LOOP_ONCE if not present.- 另请参阅:
- 常量字段值
-
-
构造器详细资料
-
AvifSequenceDrawable
public AvifSequenceDrawable(com.tencent.libqcloudavif.AvifDecoder avifDecoder, long bytesLength)
-
AvifSequenceDrawable
public AvifSequenceDrawable(com.tencent.libqcloudavif.AvifDecoder avifDecoder, long bytesLength, AvifSequenceDrawable.BitmapProvider bitmapProvider)
-
-
方法详细资料
-
setOnFinishedListener
public void setOnFinishedListener(AvifSequenceDrawable.OnFinishedListener onFinishedListener)
Register a callback to be invoked when a FrameSequenceDrawable finishes looping.- 参数:
onFinishedListener- FinishedListener- 另请参阅:
setLoopBehavior(int)
-
setLoopBehavior
public void setLoopBehavior(int loopBehavior)
Define looping behavior of frame sequence.Must be one of LOOP_INF, LOOP_DEFAULT, or LOOP_FINITE.
- 参数:
loopBehavior- loopBehavior
-
setLoopCount
public void setLoopCount(int loopCount)
Set the number of loops in LOOP_FINITE mode. The number must be a postive integer.- 参数:
loopCount- loop Count
-
isDestroyed
public boolean isDestroyed()
-
destroy
public void destroy()
Marks the drawable as permanently recycled (and thus unusable), and releases any owned Bitmaps drawable to its BitmapProvider, if attached.If no BitmapProvider is attached to the drawable, recycle() is called on the Bitmaps.
-
draw
public void draw(@NonNull android.graphics.Canvas canvas)- 指定者:
draw在类中android.graphics.drawable.Drawable
-
invalidateSelf
public void invalidateSelf()
- 覆盖:
invalidateSelf在类中android.graphics.drawable.Drawable
-
start
public void start()
- 指定者:
start在接口中android.graphics.drawable.Animatable
-
stop
public void stop()
- 指定者:
stop在接口中android.graphics.drawable.Animatable
-
isRunning
public boolean isRunning()
- 指定者:
isRunning在接口中android.graphics.drawable.Animatable
-
setVisible
public boolean setVisible(boolean visible, boolean restart)- 覆盖:
setVisible在类中android.graphics.drawable.Drawable
-
setFilterBitmap
public void setFilterBitmap(boolean filter)
- 覆盖:
setFilterBitmap在类中android.graphics.drawable.Drawable
-
setAlpha
public void setAlpha(int alpha)
- 指定者:
setAlpha在类中android.graphics.drawable.Drawable
-
setColorFilter
public void setColorFilter(android.graphics.ColorFilter colorFilter)
- 指定者:
setColorFilter在类中android.graphics.drawable.Drawable
-
getIntrinsicWidth
public int getIntrinsicWidth()
- 覆盖:
getIntrinsicWidth在类中android.graphics.drawable.Drawable
-
getIntrinsicHeight
public int getIntrinsicHeight()
- 覆盖:
getIntrinsicHeight在类中android.graphics.drawable.Drawable
-
getOpacity
public int getOpacity()
- 指定者:
getOpacity在类中android.graphics.drawable.Drawable
-
getSize
public int getSize()
-
-