Closed androidiapp closed 5 years ago
This is very simple, you can convert the text to a Bitmap and then use it as a sticker.
How to animate Text?
I want to animate text continously for 10 seconds
Is the text position change? Or is the text content change? If the text position changes only, you can refer to GraffitiStickerRender.java If the text content changes, you need to convert each changed text to a Bitmap.
But In stickerRender class, There is only preview of stickers and How can save them to gallery ?
ok Thanks But when i put my stickers in local storage then it is giving me exceptions
/storage/emulated/0/intro_text/
indexOutOfBound Exception
and in your demo you have put all resources in assets
How to import from particular folder in sdcard?
For example,
Sticker sticker = new Sticker();
sticker.components = new ArrayList<>();
Component component = new Component();
component.duration = 2000;
component.src = "text";
component.width = 245;
component.height = 245;
TextureAnchor textureAnchor = new TextureAnchor();
textureAnchor.leftAnchor = new AnchorPoint(AnchorPoint.LEFT_BOTTOM, 0, 0);
textureAnchor.rightAnchor = new AnchorPoint(AnchorPoint.RIGHT_BOTTOM, 0, 0);
textureAnchor.width = component.width;
textureAnchor.height = component.height;
component.textureAnchor = textureAnchor;
sticker.components.add(component);
ComponentConvert.convert(context, component, Path.FILE.wrap("/storage/emulated/0/intro_text/"));
setSticker(sticker);
ScreenAnchor screenAnchor = new ScreenAnchor();
screenAnchor.leftAnchor = new AnchorPoint(AnchorPoint.LEFT_TOP, 0, 0);
screenAnchor.rightAnchor = new AnchorPoint(AnchorPoint.LEFT_TOP, 0, 0);
setScreenAnchor(screenAnchor);
then your bitmaps should put in /storage/emulated/0/intro_text/text/ folder
ok thankyou so much 👍
@androidiapp did you achieve this? if yes can you please share how to add text on video and animate he text..
I want to add text in video and that text will animate on video with different animations. I tried it using FFMPEG But the output is not smooth. So i found your library
If you can help me in adding animating text in video and save it Please reply asap