StorytellerListView is a base abstract class for views displaying lists of Stories or Clips. Storyteller Views are considered legacy and support may be removed in the near future. Please prefer using Composables instead.
If you use the StorytellerViews in a RecyclerView, using the setViewHolderParent method is not mandatory but can significantly improve the UI performance.
Add the created view instance to the view hierarchy
view.addView(storyRowView)
Recommendations for StorytellerListView Hosting Activity#
Please keep in mind that Stories will open in the activity that displays a status bar
only if there is a cutout notch present on the device. In other cases, Stories will open in the
activity without a status bar.
Status bar visibility changes can have an impact on shared element transitions between Storyteller List View and
Story Viewing Activity.
For that reason, we recommend hosting activities to use LAYOUT_STABLE flags as in the code snippet below
This sections describes attributes common to StorytellerStoriesRowView and StorytellerStoriesGridView.
Notes are used to mark if there is a difference in property interpretation.
The ListConfiguration class is used to configure the StorytellerStoriesRowView and StorytellerStoriesGridView classes. It is a data class that inherits from StorytellerListConfiguration.
The categories attribute is a list of Categories that the list view should show to the user. The default value is an empty list. The categories property can be used to show specific Stories content in the row or grid by supplying a list of valid Categories as strings. Categories can be defined in the CMS.
If no Categories are assigned then the content from the default or "Home" Category is displayed.
The theme parameter is used to set the Theme for the StorytellerListView. If theme is set to null, then theme set asStoryteller.theme global property is used.
The theme determines how the items within the List View are presented as well as various features of the player once it is launched.
The uiStyle adjusts whether Storyteller renders in light mode, dark mode or follows the system setting.
uiStyle takes the following values:
StorytellerListViewStyle.AUTO - default value, the StorytellerListView will adjust its color scheme automatically according to the current system UI mode
StorytellerListViewStyle.LIGHT - force the StorytellerListView to use the light theme
StorytellerListViewStyle.DARK - force the StorytellerListView to use the dark theme
The context parameter is an optional StorytellerAnalyticsContext (which is a Map<String, String>) containing integrator-defined key-value pairs for analytics attribution. This context will be included with all analytics events originating from this UI instance. See Analytics for more details.
The visibleTiles parameter provides control over row tile sizing behavior.
visibleTiles (Float?, default: null)
Controls how many tiles are visible in the row viewport. For example, a value of 2.5f shows two full tiles and half of a third tile. The row height is automatically calculated based on:
The number of visible tiles
The screen width
The tile type (round or square)
storytellerStoriesRowView.configuration=StorytellerStoriesView.ListConfiguration(visibleTiles=3.5f,// Show 3.5 tiles in the viewportcategories=listOf("category1"),)
When visibleTiles is null (the default), the row uses automatic height calculation that scales with the system font size for improved accessibility:
storytellerStoriesRowView.configuration=StorytellerStoriesView.ListConfiguration(visibleTiles=null,// Automatic mode (default)categories=listOf("category1"),// Row height scales with device font size (Settings → Display → Font size))
Behavior Summary:
visibleTiles
Mode
Behavior
null
AUTOMATIC (default)
Row height scales with system font size (base: 150dp × font scale, capped 0.5x-2.5x). Provides the best accessibility for users who adjust their device's font size.
2.5f
DYNAMIC
Shows approximately 2.5 tiles in the viewport. Row height is calculated based on screen width and tile aspect ratio. For round tiles with many visible tiles (3+), the height automatically adjusts to prevent title text from being cut off.
Notes:
Grid views always use fixed aspect ratio sizing and ignore this parameter
AUTOMATIC mode (default) provides the best accessibility for users with visual impairments who adjust their device's font size in system settings
DYNAMIC mode is ideal when you want precise control over how many tiles are shown in the viewport
Row views only - grid views ignore the visibleTiles parameter
Item tiles will scale dynamically to fit the row or grid view.
The base size of the tiles are:
100dp width x 150dp height for square tiles
76dp width x 105dp height for round tiles
The base size will be used when rendering the row if the dimensions of the row view cannot determine its constraints. The exact dimensions of the row view will depend on how it is defined in the layout view hierarchy, including its parents.
In general, tiles will maintain its base proportion and scale up or down to meet view hierarchy constrains.
For the sake of simplicity, examples will be provided using square as 100dp/150dp = 2/3 proportions to make it easier to do calculations.
The final item tile size will be ≈ 133dp x 200dp. This is because the StorytellerStoriesRowView is wrapped in a parent view with a height of 200dp and has its size attributes set to match_parent. The system, therefore, expands the row view to fill the height of its parent and scales the width of the tiles accordingly.
In this case, the final item tile size will be the height of the window. This happens because the StorytellerStoriesRowView is defined as the top-most view and android:layout_height="match_parent" has been set on the view. The system, therefore, expands the row view to fill the window height - and so the resulting item tiles will scale to fit the window height also.
In this case, the final item tile size will be 100dp x 150dp (the base size). Since the StorytellerStoriesRowView has been defined as the child of another view, setting android:layout_height="wrap_content" makes the item tile size 100dp x 150dp (base size).
The reloadData method starts loading fresh data for all Stories from the API. On completion, it updates the Story data, starts prefetching content and updates the read status of the Stories. The onDataLoadStarted and onDataLoadComplete methods on the StorytellerListViewDelegate are called accordingly (the latter with appropriate data depending on the result of the API requests).
This sections describes attributes common to StorytellerClipsRowView and StorytellerClipsGridView.
Notes are used to mark if there is a difference in property interpretation
The ListConfiguration class is used to configure the StorytellerClipsRowView and StorytellerClipsGridView classes. It is a data class that inherits from StorytellerListConfiguration.
StorytellerClipsView.ListConfiguration class attributes:
collection: the Collection that the list view should show to the user. The default value is null.The collection property is used to show specific Clips content in the row or grid by supplying a single Collection as string. Collections can be defined in the CMS.
If no Collection is assigned, then no Clips content is displayed.
theme: This parameter is used to set the Theme for the StorytellerClipsView. If theme is set to null, then theme set asStoryteller.theme global property is used.
The theme determines how the items within the List View are presented as well as various features of the player once it is launched.
displayLimit: only display up to this number of tiles in the list.
adConfiguration: Optional per-presentation pre-roll, provider-order, cadence, and bottom-banner controls for the player opened from this row or grid. Nullable frequency and initialIndex fields independently inherit remote cadence. See Per-presentation Clips Ad Controls.
uiStyle: adjust whether Storyteller renders in light mode, dark mode or follows the system setting.
uiStyle takes the following values:
StorytellerListViewStyle.AUTO - default value, the StorytellerClipsView will adjust its color scheme automatically according to the current system UI mode
StorytellerListViewStyle.LIGHT - force the StorytellerClipsView to use the light theme
StorytellerListViewStyle.DARK - force the StorytellerClipsView to use the dark theme
context: Optional StorytellerAnalyticsContext (a Map<String, String>) containing integrator-defined key-value pairs for analytics attribution. This context will be included with all analytics events originating from this UI instance. See Analytics for more details.
Item tiles will scale dynamically to fit the row or grid view.
The base size of the tiles are:
100dp width x 150dp height for square tiles
76dp width x 105dp height for round tiles
The base size will be used when rendering the row if the dimensions of the row view cannot determine its constraints. The exact dimensions of the row view will depend on how it is defined in the layout view hierarchy, including its parents.
In general, tiles will maintain its base proportions and scale up or down to meet view hierarchy constrains.
For the sake of simplicity, examples will be provided using square as 100dp/150dp = 2/3 proportions to make it easier to do calculations.
The final item tile size will be ≈ 133dp x 200dp. This is because the StorytellerRowView is wrapped in a parent view with a height of 200dp and has its size attributes set to match_parent. The system, therefore, expands the row view to fill the height of its parent and scales the width of the tiles accordingly.
In this case, the final item tile size will be the height of the window. This happens because the StorytellerRowView is defined as the top-most view and android:layout_height="match_parent" has been set on the view. The system, therefore, expands the row view to fill the window height - and so the resulting item tiles will scale to fit the window height also.
In this case, the final item tile size will be 100dp x 150dp (the base size). Since the StorytellerRowView has been defined as the child of another view, setting android:layout_height="wrap_content" makes the item tile size 100dp x 150dp (base size).
The reloadData method starts loading fresh data for all Clips from the API. On completion, it updates the Clips data, starts prefetching content and updates the read status of the Clips. The onDataLoadStarted and onDataLoadComplete methods on the StorytellerListViewDelegate are called accordingly (the latter with appropriate data depending on the result of the API requests).
{"slug": "storyteller-list-views", "page_title": "Legacy XML List Views", "page_url": "StorytellerListViews/", "canonical_url": "/android/StorytellerListViews/", "markdown": "# What is StorytellerListView (Legacy)\n\n`StorytellerListView` is a base abstract class for views displaying lists of Stories or Clips. Storyteller Views are considered legacy and support may be removed in the near future. Please prefer using [Composables instead](StorytellerLists.md).\n\n## Showcase examples\n\n- [XML \u2014 lists screen (`DashboardFragment`)](https://github.com/getstoryteller/storyteller-showcase-android/blob/main/xml/app/src/main/java/com/getstoryteller/storytellershowcaseapp/ui/features/dashboard/DashboardFragment.kt#L30)\n- [XML \u2014 RecyclerView ViewHolders (`ViewHolders`)](https://github.com/getstoryteller/storyteller-showcase-android/blob/main/xml/app/src/main/java/com/getstoryteller/storytellershowcaseapp/ui/features/dashboard/adapter/ViewHolders.kt#L38)\n\nThe Storyteller SDK offers two implementations of this abstract class:\n\n- `StorytellerStoriesView`\n- `StorytellerClipsView`\n\nEach of these classes has their corresponding rows and grid views as the following:\n\nFor Stories\n\n- `StorytellerStoriesRowView`\n- `StorytellerStoriesGridView`\n\nFor Clips\n\n- `StorytellerClipsRowView`\n- `StorytellerClipsGridView`\n\nThis abstract class contains all abstract attributes and methods that are common to all `StorytellerListView` implementations.\n\n## How to improve the performance of RecyclerView?\n\nIf you use the `StorytellerViews` in a `RecyclerView`, using the `setViewHolderParent` method is not mandatory but can significantly improve the UI performance.\n\nInside the `RecyclerView.Adapter`:\n\n```kotlin\n...\n\noverride fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {\n val itemView = LayoutInflater.from(parent.context).inflate(R.layout.my_item, parent, false)\n return MyViewHolder(itemView, parent)\n}\n...\n```\n\nInside the `RecyclerView.ViewHolder`:\n\n```kotlin\nclass MyViewHolder(\n private val view: View,\n private val parent: ViewGroup,\n): RecyclerView.ViewHolder(view) {\n\n private val binding = ListStoryRowBinding.bind(view)\n\n fun onBind(item: Item) {\n binding.storytellerView.setViewHolderParent(parent)\n ...\n }\n}\n```\n\n## Adding a StorytellerStoriesRowView\n\nThe `StorytellerStoriesRowView` can be added to your app using XML layout or in code.\n\n### XML\n\nAdd a `com.storyteller.ui.list.StorytellerStoriesRowView` element to your layout\n\n```xml\n <com.storyteller.ui.list.StorytellerStoriesRowView\n android:id=\"@+id/storyRowView\"\n android:layout_width=\"match_parent\"\n android:layout_height=\"wrap_content\"\n ...\n />\n```\n\n### Code\n\n1. Create a `StorytellerStoriesRowView` instance\n\n```kotlin\n val storyRowView = StorytellerStoriesRowView(context)\n```\n\n1. Add the created view instance to the view hierarchy\n\n```kotlin\n view.addView(storyRowView)\n```\n\n### Recommendations for `StorytellerListView` Hosting Activity\n\nPlease keep in mind that Stories will open in the activity that displays a status bar\nonly if there is a cutout notch present on the device. In other cases, Stories will open in the\nactivity without a status bar.\n\nStatus bar visibility changes can have an impact on shared element transitions between Storyteller List View and\nStory Viewing Activity.\nFor that reason, we recommend hosting activities to use LAYOUT_STABLE flags as in the code snippet below\n\n```kotlin\n // Storyteller hosting activity onCreate method\n override fun onCreate(savedInstanceState: Bundle?) {\n super.onCreate(savedInstanceState)\n // ~~~~~~~\n window.decorView.systemUiVisibility =\n window.decorView.systemUiVisibility or View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n // ~~~~~~~\n}\n```\n\n## Further Reading\n\n### Additional Storyteller Methods\n\n`Storyteller` has some helper methods which may be useful, see [AdditionalMethods](AdditionalMethods.md) for more details.\n\n### Implementing Storyteller Callbacks\n\n`StorytellerDelegate` has callbacks for events which can be implemented, see [StorytellerDelegate](StorytellerDelegates.md) for more details.\n\n### Implementing StorytellerListView Callbacks\n\n`StorytellerListView` has callbacks for events which can be implemented, see [StorytellerListViewDelegate](StorytellerDelegates.md) for more details.\n\n## Configuring a StorytellerStoriesView\n\n### Attributes\n\nThis sections describes attributes common to `StorytellerStoriesRowView` and `StorytellerStoriesGridView`.\nNotes are used to mark if there is a difference in property interpretation.\n\n#### delegate\n\nThe `delegate` is the `StorytellerListViewDelegate` instance for `StorytellerListView` callbacks (see [Implementing StorytellerListViewDelegate methods](StorytellerDelegates.md)).\n\n#### StorytellerStoriesView.ListConfiguration\n\nThe `ListConfiguration` class is used to configure the `StorytellerStoriesRowView` and `StorytellerStoriesGridView` classes. It is a data class that inherits from `StorytellerListConfiguration`.\n\nUsage:\n\n```kotlin\n val storytellerStoriesRowView = StorytellerStoriesRowView(context)\n storytellerStoriesRowView.configuration = StorytellerStoriesView.ListConfiguration(\n theme = customTheme,\n uiStyle = StorytellerListViewStyle.AUTO,\n displayLimit = 10,\n cellType = StorytellerListViewCellType.SQUARE,\n categories = listOf(\"category1\", \"category2\", \"categoryX\"),\n context = mapOf(\"placementId\" to \"home_stories\", \"location\" to \"Home\"),\n )\n```\n\n##### cellType\n\nThe `cellType` is the style of the cell. This can either be `ROUND(0)` or `SQUARE(1)`. The default value is `SQUARE(1)`.\n\n##### categories\n\nThe `categories` attribute is a list of Categories that the list view should show to the user. The default value is an empty list. The `categories` property can be used to show specific Stories content in the row or grid by supplying a list of valid Categories as strings. Categories can be defined in the CMS.\nIf no Categories are assigned then the content from the default or \"Home\" Category is displayed.\n\n##### theme\n\nThe `theme` parameter is used to set the [Theme](Themes.md) for the `StorytellerListView`. If theme is set to null, then theme set as`Storyteller.theme` global property is used.\nThe theme determines how the items within the List View are presented as well as various features of the player once it is launched.\n\n##### uiStyle\n\nThe `uiStyle` adjusts whether Storyteller renders in light mode, dark mode or follows the system setting.\n\n`uiStyle` takes the following values:\n\n- `StorytellerListViewStyle.AUTO` - default value, the StorytellerListView will adjust its color scheme automatically according to the current system UI mode\n- `StorytellerListViewStyle.LIGHT` - force the StorytellerListView to use the light theme\n- `StorytellerListViewStyle.DARK` - force the StorytellerListView to use the dark theme\n\n##### displayLimit\n\nThe `displayLimit` is the maximum amount of tiles that can be shown in the list.\n\n##### context\n\nThe `context` parameter is an optional `StorytellerAnalyticsContext` (which is a `Map<String, String>`) containing integrator-defined key-value pairs for analytics attribution. This context will be included with all analytics events originating from this UI instance. See [Analytics](Analytics.md#context) for more details.\n\n##### visibleTiles\n\nThe `visibleTiles` parameter provides control over row tile sizing behavior.\n\n**visibleTiles** (`Float?`, default: `null`)\n\nControls how many tiles are visible in the row viewport. For example, a value of `2.5f` shows two full tiles and half of a third tile. The row height is automatically calculated based on:\n\n- The number of visible tiles\n- The screen width\n- The tile type (round or square)\n\n```kotlin\nstorytellerStoriesRowView.configuration = StorytellerStoriesView.ListConfiguration(\n visibleTiles = 3.5f, // Show 3.5 tiles in the viewport\n categories = listOf(\"category1\"),\n)\n```\n\n#### Automatic Mode (default)\n\nWhen `visibleTiles` is `null` (the default), the row uses automatic height calculation that scales with the system font size for improved accessibility:\n\n```kotlin\nstorytellerStoriesRowView.configuration = StorytellerStoriesView.ListConfiguration(\n visibleTiles = null, // Automatic mode (default)\n categories = listOf(\"category1\"),\n // Row height scales with device font size (Settings \u2192 Display \u2192 Font size)\n)\n```\n\n**Behavior Summary:**\n\n| visibleTiles | Mode | Behavior |\n| --- | --- | --- |\n| `null` | **AUTOMATIC** (default) | Row height scales with system font size (base: 150dp \u00d7 font scale, capped 0.5x-2.5x). Provides the best accessibility for users who adjust their device's font size. |\n| `2.5f` | **DYNAMIC** | Shows approximately 2.5 tiles in the viewport. Row height is calculated based on screen width and tile aspect ratio. For round tiles with many visible tiles (3+), the height automatically adjusts to prevent title text from being cut off. |\n\n**Notes:**\n\n- Grid views always use fixed aspect ratio sizing and ignore this parameter\n- AUTOMATIC mode (default) provides the best accessibility for users with visual impairments who adjust their device's font size in system settings\n- DYNAMIC mode is ideal when you want precise control over how many tiles are shown in the viewport\n- Row views only - grid views ignore the `visibleTiles` parameter\n\n#### Dynamic Scaling\n\nItem tiles will scale dynamically to fit the row or grid view.\n\nThe base size of the tiles are:\n\n- 100dp width x 150dp height for square tiles\n- 76dp width x 105dp height for round tiles\n\nThe base size will be used when rendering the row if the dimensions of the row view cannot determine its constraints. The exact dimensions of the row view will depend on how it is defined in the layout view hierarchy, including its parents.\nIn general, tiles will maintain its base proportion and scale up or down to meet view hierarchy constrains.\n\nFor the sake of simplicity, examples will be provided using `square` as `100dp/150dp = 2/3` proportions to make it easier to do calculations.\n\n##### Example 1\n\n```xml\n <com.storyteller.ui.list.StorytellerStoriesRowView\n app:cellType=\"square\"\n android:layout_width=\"match_parent\"\n android:layout_height=\"200dp\"\n ...\n />\n```\n\nThe final item tile size will be \u2248 `133dp x 200dp`, as `200 dp[h] * 2/3 [w/h] \u2248 133dp`\n\n##### Example 2\n\n```xml\n <LinearLayout\n android:layout_width=\"match_parent\"\n android:layout_height=\"200dp\"\n android:orientation=\"vertical\">\n <com.storyteller.ui.list.StorytellerStoriesRowView\n app:cellType=\"square\"\n android:layout_width=\"match_parent\"\n android:layout_height=\"match_parent\"\n ...\n />\n <\/LinearLayout>\n```\n\nThe final item tile size will be \u2248 133dp x 200dp. This is because the `StorytellerStoriesRowView` is wrapped in a parent view with a height of 200dp and has its size attributes set to `match_parent`. The system, therefore, expands the row view to fill the height of its parent and scales the width of the tiles accordingly.\n\n##### Example 3\n\n```xml\n <?xml version=\"1.0\" encoding=\"utf-8\"?>\n <com.storyteller.ui.list.StorytellerStoriesRowView\n app:cellType=\"square\"\n xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n android:layout_width=\"wrap_content\"\n android:layout_height=\"match_parent\"\n ...\n />\n```\n\nIn this case, the final item tile size will be the height of the window. This happens because the `StorytellerStoriesRowView` is defined as the top-most view and `android:layout_height=\"match_parent\"` has been set on the view. The system, therefore, expands the row view to fill the window height - and so the resulting item tiles will scale to fit the window height also.\n\n##### Example 4\n\n```xml\n ...\n\n <LinearLayout\n android:layout_width=\"match_parent\"\n android:layout_height=\"match_parent\"\n android:orientation=\"vertical\">\n\n <com.storyteller.ui.list.StorytellerStoriesRowView\n app:cellType=\"square\"\n android:layout_width=\"match_parent\"\n android:layout_height=\"wrap_content\"\n ...\n />\n\n ...\n\n <\/LinearLayout>\n```\n\nIn this case, the final item tile size will be 100dp x 150dp (the base size). Since the `StorytellerStoriesRowView` has been defined as the child of another view, setting `android:layout_height=\"wrap_content\"` makes the item tile size 100dp x 150dp (base size).\n\n#### XML\n\nAttributes can also be applied in XML.\n\n```xml\n<com.storyteller.ui.list.StorytellerStoriesRowView\n android:layout_width=\"match_parent\"\n android:layout_height=\"wrap_content\"\n app:cellType=\"round\"/>\n```\n\n### Methods\n\n#### reloadData\n\nThe `reloadData` method starts loading fresh data for all Stories from the API. On completion, it updates the Story data, starts prefetching content and updates the read status of the Stories. The `onDataLoadStarted` and `onDataLoadComplete` methods on the [StorytellerListViewDelegate](StorytellerDelegates.md) are called accordingly (the latter with appropriate data depending on the result of the API requests).\n\n```kotlin\n val storytellerStoriesRowView = StorytellerStoriesRowView(context)\n storytellerStoriesRowView.reloadData()\n```\n\n## Configuring a StorytellerClipsView\n\n### Attributes\n\nThis sections describes attributes common to `StorytellerClipsRowView` and `StorytellerClipsGridView`.\nNotes are used to mark if there is a difference in property interpretation\n\n#### StorytellerListViewDelegate\n\n- `delegate`: the `StorytellerListViewDelegate` instance for `StorytellerClipsView` callbacks (see [Implementing StorytellerListViewDelegate methods](StorytellerDelegates.md))\n\n#### StorytellerClipsView.ListConfiguration\n\nThe `ListConfiguration` class is used to configure the `StorytellerClipsRowView` and `StorytellerClipsGridView` classes. It is a data class that inherits from `StorytellerListConfiguration`.\n\n`StorytellerClipsView.ListConfiguration` class attributes:\n\nExample:\n\n```kotlin\n val storytellerClipsRowView = StorytellerClipRowView(context)\n storytellerClipsRowView.configuration = StorytellerClipsView.ListConfiguration(\n theme = customTheme,\n uiStyle = StorytellerListViewStyle.AUTO,\n displayLimit = 10,\n cellType = StorytellerListViewCellType.SQUARE,\n collection = \"collectionId\",\n adConfiguration = Storyteller.StorytellerClipsAdConfiguration(\n preRollEnabled = false,\n betweenClipsAdProviderOrder = listOf(\n Storyteller.StorytellerAdProvider.GAM,\n Storyteller.StorytellerAdProvider.VAST,\n ),\n frequency = 4,\n initialIndex = 1,\n ),\n context = mapOf(\"placementId\" to \"home_clips\", \"location\" to \"Home\"),\n)\n```\n\n- `collection`: the Collection that the list view should show to the user. The default value is `null`.The `collection` property is used to show specific Clips content in the row or grid by supplying a single Collection as string. Collections can be defined in the CMS.\n If no Collection is assigned, then no Clips content is displayed.\n- `theme`: This parameter is used to set the [Theme](Themes.md) for the `StorytellerClipsView`. If theme is set to `null`, then theme set as`Storyteller.theme` global property is used.\n The theme determines how the items within the List View are presented as well as various features of the player once it is launched.\n- `displayLimit`: only display up to this number of tiles in the list.\n- `adConfiguration`: Optional per-presentation pre-roll, provider-order, cadence, and bottom-banner controls for the player opened from this row or grid. Nullable `frequency` and `initialIndex` fields independently inherit remote cadence. See [Per-presentation Clips Ad Controls](Ads.md#per-presentation-clips-ad-controls).\n- `uiStyle`: adjust whether Storyteller renders in light mode, dark mode or follows the system setting.\n\n`uiStyle` takes the following values:\n\n- `StorytellerListViewStyle.AUTO` - default value, the StorytellerClipsView will adjust its color scheme automatically according to the current system UI mode\n- `StorytellerListViewStyle.LIGHT` - force the StorytellerClipsView to use the light theme\n- `StorytellerListViewStyle.DARK` - force the StorytellerClipsView to use the dark theme\n\n- `context`: Optional `StorytellerAnalyticsContext` (a `Map<String, String>`) containing integrator-defined key-value pairs for analytics attribution. This context will be included with all analytics events originating from this UI instance. See [Analytics](Analytics.md#context) for more details.\n\n#### Feed Title\n\nThe feed title in the Clips player can be configured in the CMS for the Collection. This can be a custom title or image.\n\n### Dynamic Scaling\n\nItem tiles will scale dynamically to fit the row or grid view.\n\nThe base size of the tiles are:\n\n- 100dp width x 150dp height for square tiles\n- 76dp width x 105dp height for round tiles\n\nThe base size will be used when rendering the row if the dimensions of the row view cannot determine its constraints. The exact dimensions of the row view will depend on how it is defined in the layout view hierarchy, including its parents.\nIn general, tiles will maintain its base proportions and scale up or down to meet view hierarchy constrains.\n\nFor the sake of simplicity, examples will be provided using `square` as `100dp/150dp = 2/3` proportions to make it easier to do calculations.\n\n#### Example 1\n\n```xml\n <com.storyteller.ui.list.StorytellerClipsRowView\n app:cellType=\"square\"\n android:layout_width=\"match_parent\"\n android:layout_height=\"200dp\"\n ...\n />\n```\n\nThe final item tile size will be \u2248 `133dp x 200dp`, as `200 dp[h] * 2/3 [w/h] \u2248 133dp`\n\n#### Example 2\n\n```xml\n <LinearLayout\n android:layout_width=\"match_parent\"\n android:layout_height=\"200dp\"\n android:orientation=\"vertical\">\n <com.storyteller.ui.list.StorytellerClipsRowView\n app:cellType=\"square\"\n android:layout_width=\"match_parent\"\n android:layout_height=\"match_parent\"\n ...\n />\n <\/LinearLayout>\n```\n\nThe final item tile size will be \u2248 133dp x 200dp. This is because the `StorytellerRowView` is wrapped in a parent view with a height of 200dp and has its size attributes set to `match_parent`. The system, therefore, expands the row view to fill the height of its parent and scales the width of the tiles accordingly.\n\n#### Example 3\n\n```xml\n <?xml version=\"1.0\" encoding=\"utf-8\"?>\n <com.storyteller.ui.list.StorytellerClipsRowView\n app:cellType=\"square\"\n xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n xmlns:tools=\"http://schemas.android.com/tools\"\n android:layout_width=\"wrap_content\"\n android:layout_height=\"match_parent\"\n ...\n />\n```\n\nIn this case, the final item tile size will be the height of the window. This happens because the `StorytellerRowView` is defined as the top-most view and `android:layout_height=\"match_parent\"` has been set on the view. The system, therefore, expands the row view to fill the window height - and so the resulting item tiles will scale to fit the window height also.\n\n#### Example 4\n\n```xml\n ...\n\n <LinearLayout\n android:layout_width=\"match_parent\"\n android:layout_height=\"match_parent\"\n android:orientation=\"vertical\">\n\n <com.storyteller.ui.list.StorytellerClipsRowView\n app:cellType=\"square\"\n android:layout_width=\"match_parent\"\n android:layout_height=\"wrap_content\"\n ...\n />\n\n ...\n\n <\/LinearLayout>\n```\n\nIn this case, the final item tile size will be `100dp x 150dp` (the base size). Since the `StorytellerRowView` has been defined as the child of another view, setting `android:layout_height=\"wrap_content\"` makes the item tile size `100dp x 150dp` (base size).\n\n### XML\n\nViews can also be applied in XML.\n\n```xml\n<com.storyteller.ui.list.StorytellerClipsRowView\n android:layout_width=\"match_parent\"\n android:layout_height=\"wrap_content\"/>\n```\n\n### Methods\n\n#### reloadData\n\nThe `reloadData` method starts loading fresh data for all Clips from the API. On completion, it updates the Clips data, starts prefetching content and updates the read status of the Clips. The `onDataLoadStarted` and `onDataLoadComplete` methods on the [StorytellerListViewDelegate](StorytellerDelegates.md) are called accordingly (the latter with appropriate data depending on the result of the API requests).\n\n```kotlin\nval storytellerClipsRowView = StorytellerClipsRowView(context)\nstorytellerClipsRowView.reloadData()\n```\n", "copy_markdown_include_header": false, "base_path": "android", "ai_dir": "ai", "missing_payload_behavior": "empty"}