# UI Customizations

This guide shows you how to customize the story experience of your users. These customizations apply to both storyly bar and story view.

WARNING

If you are planning to do some of the customizations in the layout XML file, then the following part should be added as a layout attribute:

xmlns:app="http://schemas.android.com/apk/res-auto"

Before you begin

It is advised to apply these customizations after StorylyInit if you are planning to do the customizations programmatically.

# Storyly Bar Customizations

This section shows supported customizations on the storyly bar.

# Story Group Text Color

This attribute changes the text color of the story group. This attribute can be specified programmatically, from the layout XML file or from attributes section of design view.

In order to set this attribute, use one of the following methods:

    In order to set this attribute from the design view, find and fill the storyGroupTextColor attribute.

    # Story Group Text Visibility

    This styling changes the visibility of story group text. This attribute can be specified programmatically, from the layout XML file or from attributes section of design view.

    In order to set this attribute, use one of the following methods:

      In order to set this attribute from the design view, find and fill the storyGroupTextIsVisible attribute.

      # Story Group Text Typeface

      This attribute changes the typeface of the story group text. This attribute can only be specified programmatically.

      In order to set this attribute, use one of the following methods:

        # Story Group Icon Background Color

        This attribute changes the background color of the story group icon that is shown to the user as skeleton view till the stories are loaded. This attribute can be specified programmatically, from the layout XML file or from attributes section of design view.

        In order to set this attribute, use one of the following methods:

          In order to set this attribute from the design view, find and fill the storyGroupIconBackgroundColor attribute.

          # Story Group Icon Border Seen State Color

          This attribute changes the border color of the story group icons that are seen by the user. The border consists of color gradients. This attribute can be specified programmatically, from the layout XML file or from attributes section of design view.

          WARNING

          At least 2 colors must be defined in order to use this attribute. If a single color is requested, a same color code can be used twice.

          In order to set this attribute, use one of the following methods:

            In order to set this attribute from the design view, find and fill the storyGroupIconBorderColorSeen attribute as an array of color codes.

            # Story Group Icon Border Not Seen State Color

            This attribute changes the border color of the story group icons hat are unseen by the user. The border consists of color gradients. This attribute can be specified programmatically, from the layout XML file or from attributes section of design view.

            WARNING

            At least 2 colors must be defined in order to use this attribute. If a single color is requested, a same color code can be used twice.

            In order to set this attribute, use one of the following methods:

              In order to set this attribute from the design view, find and fill the storyGroupIconBorderColorNotSeen attribute as an array of color codes.

              # Story Group Pin Icon Color

              If any of the story groups are selected as pinned groups from the dashboard, a little star icon will appear along with the story group icon. This attribute changes the background color of this pin icon. This attribute can be specified programmatically, from the layout XML file or from attributes section of design view.

              In order to set this attribute, use one of the following methods:

                In order to set this attribute from the design view, find and fill the storyGroupPinIconColor attribute.

                # Story Group Ivod Icon Color

                If any of the story groups are selected as the IVod group type from the dashboard, a little camera icon will appear along with the story group icon. This attribute changes the background color of this Ivod icon. This attribute can be specified programmatically, from the layout XML file or from attributes section of design view.

                In order to set this attribute, use one of the following methods:

                  In order to set this attribute from the design view, find and fill the storyGroupIVodIconColor attribute.

                  # Story Group Size

                  This attribute changes the size of the story group. This attribute can be specified programmatically, from the layout XML file or from attributes section of design view. Currently, supported sizes are small, large, xlarge and custom sizes. The default story group size is large.

                  In order to set this attribute, use one of the following methods:

                    In order to set this attribute from the design view, find and fill the storyGroupSize attribute.

                    TIP

                    If you set your story group size as custom, you can change a few measures of the story groups such as icon height, icon width, icon corner radius. Check the Custom Size Story Group Icon Styling.

                    # Custom Size Story Group Icon Styling

                    This styling changes the shape of the story group icons, their corners, and the distance between each other. You can create square, circle, and oval-shaped icons using these attributes. This styling can be specified programmatically, from the layout XML file or from attributes section of design view. You should set a StoryGroupIconStyling instance, which consists of the following variables: height, width, cornerRadius.

                    WARNING

                    This section is effective if you set your story group size as custom. If you set any other size and use this attribute, your changes will not take effect.

                    In order to set this attribute, use one of the following methods:

                      In order to set these attributes from design view, find and fill the storyGroupIconHeight, storyGroupIconWidth, and storyGroupIconCornerRadius attributes.

                      WARNING

                      If you are not planning to use XML attributes, then you should set pixel values for the variables of StoryGroupIconStyling.

                      # Story Group List Styling

                      This styling changes the distance between the story groups and edge paddings of the first and last story groups. This styling can be specified programmatically, from the layout XML file or from attributes section of design view.

                      In order to set this attribute, use one of the following methods:

                        In order to set these attributes from design view, find and fill the storyGroupListPaddingBetweenItems and storyGroupListEdgePadding attributes.

                        WARNING

                        If you are not planning to use XML attributes, then you should set pixel values for the variables of StoryGroupListStyling.

                        # Story Group Thematic Icon Image

                        This feature lets you use different story groups images for different labels. If you set dark mode images for your story groups from the Storyly dashboard, you can set a dark label to show these dark mode icons. This attribute can be specified programmatically, from the layout XML file or from attributes section of design view.

                        WARNING

                        If you use the following methods to set the label without setting dark mode images from the dashboard, default group images will be used. If you already set the dark mode images but send a string label other than dark, again default group images will be used.

                        In order to set this attribute, use one of the following methods:

                          In order to set this attribute from the design view, find and fill the storyGroupIconImageThematicLabel attribute.

                          # Story View Customizations

                          This section shows supported customizations on story view.

                          # Storyly View Header Text Color

                          This attribute changes the header text color of the story view. This attribute can be specified programmatically, from the layout XML file or from attributes section of design view.

                          In order to set this attribute, use one of the following methods:

                            In order to set this attribute from the design view, find and fill the storyItemTextColor attribute.

                            # Storyly View Header Icon Border Color

                            This attribute changes the header icon border color of the story view. The border consists of color gradients. This attribute can be specified programmatically, from the layout XML file or from attributes section of design view.

                            WARNING

                            At least 2 colors must be defined in order to use this attribute. If a single color is requested, a same color code can be used twice.

                            In order to set this attribute, use one of the following methods:

                              In order to set this attribute from the design view, find and fill the storyItemIconBorderColor attribute as an array of color codes.

                              # Storyly View Progress Bar Color

                              This attribute changes the progress bar colors, two colors, of the story view. The first defined color is the color of the background bars and the second one is the color of the foreground bars while watching the stories. This attribute can be specified programmatically, from the layout XML file or from attributes section of design view.

                              WARNING

                              Only 2 colors must be defined in order to use this attribute.

                              In order to set this attribute, use one of the following methods:

                                In order to set this attribute from the design view, find and fill the storyItemProgressBarColor attribute as an array of color codes.

                                # Storyly View Header Icon and Text Visibility

                                This styling changes the visibility of story group text. This attribute can be specified programmatically, from the layout XML file or from attributes section of design view.

                                In order to set this attribute, use one of the following methods:

                                  In order to set these attributes from design view, find and fill the storyHeaderIconIsVisible and storyHeaderTextIsVisible attributes.

                                  # Storyly View Header Text Typeface

                                  This attribute changes the typeface of the story view header text. This attribute can only be specified programmatically.

                                  In order to set this attribute, use one of the following methods:

                                    # Storyly View Loading View

                                    This customization changes the default loading view to the desired custom loading view. In order to change this view, you need to prepare your own loading view, which must inherit from StorylyLoadingView. You can see an example class in the following code snippet:

                                      After you create your custom loading view, set it by using the following methods:

                                        # Storyly View Interactive Font

                                        This attribute changes the typeface of all text view's font in interactive components. This attribute can only be specified programmatically.

                                        In order to set this attribute, use one of the following methods:

                                          WARNING

                                          Storyly will use Typeface.Default if custom font is not set.

                                          WARNING

                                          Storyly will arrange font size for each text view in interactive components so that custom font size arrangement is not possible.