Skip to main content
Language

Configure Stickers

PhotoEditor SDK supports several configuration options for the StickerToolPanel allowing flexible adaptation to different needs and use cases.

Personal stickers#

The default configuration does not allow users to add custom stickers. In this example, we enable users to add stickers from the device's gallery.

Weather smart stickers#

By default, the editor provides a variety of different stickers when the assets:sticker-shapes and assets:sticker-emoticons modules are included in your project. Including backend:sticker-smart module also adds some smart stickers.

Here, we also want to include weather smart stickers. For this, we provide our implementation of WeatherProvider.

Custom stickers#

Here, we add a CustomStickerCategoryItem that shows your own Fragment when the category is selected. This allows you to fully customize the UI according to your needs. For this example, we have created an ExampleStickersFragment that adds a sticker to the canvas when a button is clicked.

Dynamic smart stickers#

Here, we add a MetadataImageStickerItem that shows your own DialogFragment when the sticker is selected. This allows you to construct the metadata that is needed for your dynamic smart sticker while fully customizing the UI according to your needs.

For this example, we have created an ExampleMetadataFragment that takes text input from the user and passes it as part of the metadata. The ExampleSmartLinkTextSticker takes this metadata to render its content.

Set available tools#

By default, all available sticker tools are enabled. In our example, we only allow replacing stickers and changing the color.

Set available colors#

By default, the editor provides a variety of different colors to customize the color of the sticker. For this example, only a small selection of colors is shown by default.