StorylyView

class StorylyView @JvmOverloads() constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : FrameLayout

This class is the main view of Storyly.

Constructors

StorylyView
Link copied to clipboard
fun StorylyView(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0)

Functions

setStoryGroupIconBackgroundColor
Link copied to clipboard
fun setStoryGroupIconBackgroundColor(color: Int)
This function allows you to change the background color of the story group icon which is shown to the user as skeleton view till the stories are loaded
setStoryGroupIconBorderColorNotSeen
Link copied to clipboard
fun setStoryGroupIconBorderColorNotSeen(colors: Array<Int>)
This function allows you to change the border color of the story group icons which are unwatched by the user.
setStoryGroupIconBorderColorSeen
Link copied to clipboard
fun setStoryGroupIconBorderColorSeen(colors: Array<Int>)
This function allows you to the border color of the story group icons which are watched by the user.
setStoryGroupIconForegroundColor
Link copied to clipboard
fun setStoryGroupIconForegroundColor(colors: Array<Int>)
This function allows you to change the gradient colors behind the story group text if group size is set to XLarge
setStoryGroupIconImageThematicLabel
Link copied to clipboard
fun setStoryGroupIconImageThematicLabel(label: String)
This function allows you to use different story groups images for different labels
setStoryGroupIconStyling
Link copied to clipboard
fun setStoryGroupIconStyling(storyGroupIconStyling: StoryGroupIconStyling)
This function allows you to change the shape of the story group icons, their corners and the distance between each other if you set your story group size as custom
setStoryGroupIVodIconColor
Link copied to clipboard
fun setStoryGroupIVodIconColor(color: Int)
If any of the story group is selected as Ivod group type from dashboard, a little camera will appear along with the story group icon.
setStoryGroupListStyling
Link copied to clipboard
fun setStoryGroupListStyling(storyGroupListStyling: StoryGroupListStyling)
This function allows you to change the distance between the story groups and edge paddings of the first and last story groups
setStoryGroupPinIconColor
Link copied to clipboard
fun setStoryGroupPinIconColor(color: Int)
If any of the story group is selected as pinned group from dashboard, a little star icon will appear along with the story group icon.
setStoryGroupSize
Link copied to clipboard
fun setStoryGroupSize(storyGroupSize: StoryGroupSize)
This function allows you to change the size of the story group
setStoryGroupTextColor
Link copied to clipboard
fun setStoryGroupTextColor(color: Int)
This function allows you to change the text color of the story group
setStoryGroupTextStyling
Link copied to clipboard
fun setStoryGroupTextStyling(storyGroupTextStyling: StoryGroupTextStyling)
This function allows you to change the visibility of story group text
setStoryGroupTextTypeface
Link copied to clipboard
fun setStoryGroupTextTypeface(typeface: Typeface)
This function allows you to change the typeface of the story group text
setStoryHeaderStyling
Link copied to clipboard
fun setStoryHeaderStyling(storyHeaderStyling: StoryHeaderStyling)
This function allows you to change the visibility of story view header icon and text.
setStoryItemIconBorderColor
Link copied to clipboard
fun setStoryItemIconBorderColor(colors: Array<Int>)
This function allows you to change the header icon border color of the story view
setStoryItemProgressBarColor
Link copied to clipboard
fun setStoryItemProgressBarColor(colors: Array<Int>)
This function allows you to change the progress bar colors of the story view.
setStoryItemTextColor
Link copied to clipboard
fun setStoryItemTextColor(color: Int)
This function allows you to change the header text color of the story view
setStoryItemTextTypeface
Link copied to clipboard
fun setStoryItemTextTypeface(typeface: Typeface)
This function allows you to change the typeface of the story view header text
dismiss
Link copied to clipboard
fun dismiss(animation: StorylyAnimation? = null)
This function allows you to dismiss story view.
dismissExternalActionView
Link copied to clipboard
fun dismissExternalActionView()
This function dismisses your already open external view
refresh
Link copied to clipboard
fun refresh()
This function allows you to refetch the data from network By default you do not need to use this function.
setExternalData
Link copied to clipboard
fun setExternalData(externalData: List<Map<String, Any?>>?): Boolean
This function allows you to specify data of custom template groups
show
Link copied to clipboard
fun show(animation: StorylyAnimation? = null)
This function allows you to open the story view.
showExternalActionView
Link copied to clipboard
fun showExternalActionView(externalActionView: View)
This function allows you to open your custom external view

Properties

storylyExternalViewProvider
Link copied to clipboard
var storylyExternalViewProvider: StorylyExternalViewProvider? = null
This property will allow you to add external view on stories
storylyInit
Link copied to clipboard
var storylyInit: StorylyInit
This property triggers StorylyView initialization
storylyListener
Link copied to clipboard
var storylyListener: StorylyListener? = null
This property will notify you when an event occurs in StorylyView.
storylyLoadingView
Link copied to clipboard
var storylyLoadingView: StorylyLoadingView?
This property will allow you to add custom custom loading view