1 min read

Feature module

The Dynamic content feature module includes all the presentation logic required to display the SlotComponents. If you need to include this module, add it to your build.gradle:

implementation ("com.poqstudio:content.dynamiccontent:$VERSION_NAME")

SlotComponents

Dynamic content SDK can render different UI components called SlotComponents. These are the supported SlotComponents:

  • Primitive:
    • Button: it shows a button with primary, secondary or tertiary styles.
    • Empty: it shows nothing, i.e.: an HorizontalSplitter with an empty component.
    • Text: it shows text with the style and alignment received.
    • Image: it shows a full width image respecting its aspect ratio.
    • Spacer: it shows a Spacer with the provided height.
    • Video: it shows a full width video with no controls, which plays looping indefinitely when more than 50% of its surface is visible. When multiple videos are visible, the one closest to the center of the screen will play.
  • Container:
  • Carousel:

SlotComponentModifiers

SlotComponents support SlotComponentModifier, modifiers that change SlotComponents and are supported by all SlotComponents. These are similar to Compose modifiers and they are mapped into Compose modifiers on the presentation layer. These are the supported modifiers:

  • Padding: it applies padding
  • Accessibility: it adds a content description.