Gappein Sticker SDK is just android SDK where you can convert your text as Sticker.
- You can use it with your XML View
- And yes, it can be used in your view file.
implementation 'com.gappein:sticker:1.0.0'
Add it in the onCreate() of your view file like,
val stickerView = StickerView(this)
And to generate the Sticker for the entered text view,
stickerView.generateSticker("TEXT TO GENERATE STICKER")
This will return the Bitmap and just perform your actions :)
Add in your XML like,
<com.gappein.ui.StickerView
android:id="@+id/stickerView"
android:layout_width="wrap_content"
android:layout_height="0dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
and similar to above, to generate sticker use,
stickerView.generateSticker("TEXT TO GENERATE STICKER")
This will also return the Bitmap you are done :)
- Prefer the length of characters upto 20 for better display of Stickers.