Class Info |
|---|
public class StickerLayout extends View 贴纸花字功能实现类。 |
Qualifier and Type |
Method Name and Description |
|---|---|
int |
addSticker(java.lang.String rootPath, java.lang.String fileName) 添加水印花字贴纸。 |
void |
setStickerLayoutListener(StickerLayout.StickerLayoutListener stickerLayoutListener) 设置用户对贴纸花字的一些操作的回调。 |
void |
updateStickerText(com.huawei.hms.image.vision.sticker.item.TextEditInfo textEditInfo) 更新花字的文本。 |
void |
移除所有贴纸花字。 |
Constructor |
|---|
public StickerLayout(android.content.Context context) 默认的构造方法。 |
Parameters
Name |
Description |
|---|---|
context |
上下文。 |
Method |
|---|
public int addSticker(java.lang.String rootPath, java.lang.String fileName) 添加水印花字贴纸。 |
Parameters
Name |
Description |
|---|---|
rootPath |
资源文件根目录。 |
fileName |
如果是贴纸,需要指定的文件名,其他可以传null。 |
Returns
Type |
Description |
|---|---|
int |
返回码,参见ResultCode。 |
Method |
|---|
public void setStickerLayoutListener(StickerLayout.StickerLayoutListener stickerLayoutListener) 设置用户对贴纸花字的一些操作的回调。 |
Parameters
Name |
Description |
|---|---|
stickerLayoutListener |
回调对象。 |
Method |
|---|
public void updateStickerText(com.huawei.hms.image.vision.sticker.item.TextEditInfo textEditInfo) 更新花字的文本。 |
Parameters
Name |
Description |
|---|---|
textEditInfo |
花字的文本相关信息。 |
Methods Inherited from Class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |