java.lang.Object | ||
↳ | View | |
↳ | com.ksyun.media.shortvideo.sticker.KSYStickerView |
贴纸 View
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 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
remove all stickers
the the content of text
set color of text
隐藏当前编辑态的贴纸的辅助区域绘制
预览停止时,需要停止贴纸的绘制
更新贴纸的时间