StickerView icon indicating copy to clipboard operation
StickerView copied to clipboard

Edit textSticker on click

Open Surabhi3 opened this issue 8 years ago • 8 comments

how can i edit textsticker on click

Surabhi3 avatar Aug 25 '17 13:08 Surabhi3

maybe you want this : https://github.com/wuapnjie/StickerView/issues/54

Hitexroid avatar Aug 30 '17 16:08 Hitexroid

For this You need to take currentSticker Object like below code. Add this code in Sticker click event.

if (stickerView.getCurrentSticker() instanceof TextSticker) {
            ((TextSticker) stickerView.getCurrentSticker()).setText(view);
            ((TextSticker) stickerView.getCurrentSticker()).setTextColor(Color.BLACK);
            ((TextSticker) stickerView.getCurrentSticker()).setTextAlign(Layout.Alignment.ALIGN_CENTER);
            ((TextSticker) stickerView.getCurrentSticker()).resizeText();

            stickerView.replace(editSticker);
            stickerView.invalidate();
}

ankurbhut avatar Jan 04 '18 06:01 ankurbhut

how to edit the text in text sticker in run time??

vrsrohit avatar Jan 04 '18 12:01 vrsrohit

and where is the editsticker you are replacing here plz reply asap

vrsrohit avatar Jan 04 '18 12:01 vrsrohit

I am use this in double tapped on text sticker. That time i am open writing text dialog and when return from them that time add this code for edit current text sticker.

ankurbhut avatar Jan 05 '18 10:01 ankurbhut

oh you are applying all these changes to variable editsticker (which is a instance of text sticker ) right??

vrsrohit avatar Jan 05 '18 10:01 vrsrohit

Yes

ankurbhut avatar Jan 05 '18 15:01 ankurbhut

and where is the editsticker you are replacing here plz reply asap

Hey I have a same problem did you solved your problem if yes then help me I want to do the same edit the text of sticker in edittext runtime

sz32 avatar May 17 '19 11:05 sz32