public class

KSYStickerView

extends View
java.lang.Object
   ↳ View
     ↳ com.ksyun.media.shortvideo.sticker.KSYStickerView

Class Overview

贴纸 View

Summary

Nested Classes
class KSYStickerView.DrawTextParams  
interface KSYStickerView.OnStickerStateChanged  
Public Constructors
KSYStickerView(Context context)
KSYStickerView(Context context, AttributeSet attrs)
KSYStickerView(Context context, AttributeSet attrs, int defStyleAttr)
Public Methods
synchronized int addSticker(KSYStickerInfo params, StickerHelpBoxInfo helpBoxInfo)
void configSticker()
void draw()
void enableReversePlay(boolean enable, long duration)
String getCurrentText()
int getCurrentTextColor()
float getCurrentTextSize()
TreeMap<Long, List<StickerEvent>> getStickerEvents()
boolean onTouchEvent(MotionEvent event)
void release()
synchronized void removeBitmapStickers()
synchronized void removeSticker(int index)
void removeStickers()
remove all stickers
synchronized void removeTextStickers()
boolean setCurrentText(String text)
the the content of text
void setCurrentTextColor(int newColor)
set color of text
void setDrawHelpTool(boolean drawHelpTool)
隐藏当前编辑态的贴纸的辅助区域绘制
void setOnStickerSelected(KSYStickerView.OnStickerStateChanged stickerSelected)
void stopPreview(boolean stopped)
预览停止时,需要停止贴纸的绘制
synchronized boolean updateStickerDraw(long currentPosition)
void updateStickerInfo(int index, long startTime, long duration)
更新贴纸的时间
void updateStickerInfo(KSYStickerInfo params)
修改贴纸信息,本接口不保留旋转、缩放、移动信息
Protected Methods
void onSizeChanged(int w, int h, int oldw, int oldh)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public KSYStickerView (Context context)

public KSYStickerView (Context context, AttributeSet attrs)

public KSYStickerView (Context context, AttributeSet attrs, int defStyleAttr)

Public Methods

public synchronized int addSticker (KSYStickerInfo params, StickerHelpBoxInfo helpBoxInfo)

public void configSticker ()

public void draw ()

public void enableReversePlay (boolean enable, long duration)

public String getCurrentText ()

public int getCurrentTextColor ()

public float getCurrentTextSize ()

public TreeMap<Long, List<StickerEvent>> getStickerEvents ()

public boolean onTouchEvent (MotionEvent event)

public void release ()

public synchronized void removeBitmapStickers ()

public synchronized void removeSticker (int index)

public void removeStickers ()

remove all stickers

public synchronized void removeTextStickers ()

public boolean setCurrentText (String text)

the the content of text

public void setCurrentTextColor (int newColor)

set color of text

public void setDrawHelpTool (boolean drawHelpTool)

隐藏当前编辑态的贴纸的辅助区域绘制

public void setOnStickerSelected (KSYStickerView.OnStickerStateChanged stickerSelected)

public void stopPreview (boolean stopped)

预览停止时,需要停止贴纸的绘制

public synchronized boolean updateStickerDraw (long currentPosition)

public void updateStickerInfo (int index, long startTime, long duration)

更新贴纸的时间

public void updateStickerInfo (KSYStickerInfo params)

修改贴纸信息,本接口不保留旋转、缩放、移动信息

Protected Methods

protected void onSizeChanged (int w, int h, int oldw, int oldh)