Skip to main content

Widget styling and customization

The best way to style and customize the widget is using StorifyMe Widget Editor, which is a visual tool available inside StorifyMe platform.

SDK specific styling

Adding loading animation

You can set a default loading animation while the story widget is loading, here is the example code:

main.kt
storiesView.showProgressBarView(true)

and to set your custom loading view please use:

main.kt
fun setProgressBarView(view: YourLoadingAnimationView)

Custom font

Download the font, it should be in .ttf format, maybe some others will do. Place it somewhere in the project you want.

main.kt
StorifyMe.instance.supportedFonts = listOf(
CustomFont("Aclonica", "aclonica.ttf"),
CustomFont("Courier", "courier.ttf"),
CustomFont("Aladin", "aladin.ttf")
)

Opening story animation

Stories presenting can be customized.

If for some reason you want to disable the animations, just set enabledStoryItemPulseAnimation to false.

Flags can be customized, the default behaviour is listed below.

main.kt
storiesView.setStoryViewerOptions(
flags = Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS or Intent.FLAG_ACTIVITY_NO_HISTORY,
enabledStoryItemPulseAnimation = true
)

Grid Collection View Behavior

StorifyMeGridCollectionViewBehavior which offers flexible options for customizing the behavior of grid collection views. This includes the capability to adjust the height of the first story using the setGridCollectionViewBehavior(:) method.

main.kt
storifyMeWidget.setGridCollectionViewBehavior(
StorifyMeGridCollectionViewBehavior.AdjustFirstStoryHeight(
0.75f
)
)