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.
    • HorizontalDivider: it shows a grey horizontal line to use as content divider.
    • Html it shows HTML content,
    • Text: it shows text with the style and alignment received.
    • TextField: it shows a PoqTextField
    • 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:
    • Column: it shows its childs components in a column.
    • HorizontalSplitter: it shows its childs components in a row splitting the space equally.
    • ScrollableColumn: it shows its childs components in a Lazy column.
  • Carousel:
    • ImageCarousel
      • Square: it shows an image carousel with square images.
      • Peek: it shows an image carousel, the image width will be 80% of the screen width and the height will respect the original image aspect ratio.
      • FullWidth: it shows an image carousel, the image will cover the entire width of the screen and the height will respect the original image aspect ratio.
    • RecentlyViewed: it shows a recently viewed carousel.
    • UrlProductCarousel: it shows a UrlProductCarousel.
  • Countdown:
    • Countdown Timer: it shows a countdown timer and a title. The countdown timer can be displayed in the specific formats: "dd:hh:mm:ss" ("Days:Hours:Minutes:Seconds"), "hh:mm:ss"("Hours:Minutes:Seconds") and "mm:ss" ("Minutes:Seconds").

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.