Skip to content
This repository has been archived by the owner on Mar 17, 2023. It is now read-only.

How to import my own stickers to edit image view? #76

Open
yambosyam82 opened this issue Oct 27, 2020 · 1 comment
Open

How to import my own stickers to edit image view? #76

yambosyam82 opened this issue Oct 27, 2020 · 1 comment

Comments

@yambosyam82
Copy link

For the function withStickerFeature(), I found that I can't change the default sticker set, how can I change it? Please update me if you have any solutions of it, thankyou!

@tmarsteel
Copy link

You can specify them in your strings resources. First, specify the category/type labels:

<string-array name="iamutkarshtiwari_github_io_ananas_type_names">
    <item>Shapes</item>
    <item>More...</item>
</string-array>

You can then specify the path beneath res/drawable to the stickers of each category/type:

<string-array translatable="false" name="iamutkarshtiwari_github_io_ananas_types">
    <item>shape</item> <!-- path for category 1 -->
    <item>foo</item> <!-- path for category 2 ... -->
</string-array>

And then you have to specify the amount of stickers in each category/type:

<integer-array translatable="false" name="iamutkarshtiwari_github_io_ananas_type_count">
    <item>2</item> <!-- 2 stickers in category 1 -->
</integer-array>

The darwables for the stickers have to be located in res/drawable/$path_$n. So e.g. my two files for category 1 are res/drawable/shape_1.png and res/drawable/shape_2.png.

Note that the drawables must be bitmaps as of now. XML drawables don't work.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants