Skip to content

Layout

Common layout properties for a collection view as those used in the SimplePropertyCollection, ObjectCollection, KeyValue, and ImageCollection sections.

Layout Properties

Property Type Required Default
LayoutType enum Optional "HorizontalFit"
MinimumInteritemSpacing integer Optional
NumberOfColumns integer Optional 2

LayoutType

ImageCollection only.

  • type: enum
  • default: "HorizontalFit"

The value of this property must be equal to one of the known values below.

LayoutType Known Values

Value Description
HorizontalScroll
HorizontalFit
Vertical

MinimumInteritemSpacing

The minimum horizontal space between two items. If not provided, the SDK default will be used. Ignored by ImageCollection.

  • type: integer

NumberOfColumns

The number of columns to be displayed.

  • In iOS, this setting is only valid in regular mode (iPad or large iPhone Landscape). In compact mode it will always be set to 1 column.
  • In Android, this setting is only valid when current screen width is larger than 600dpi. When the current screen width (e.g. in phone portrait mode) is less than 600dpi, it will always be set to 1 column.
  • Ignored by ImageCollection.

  • type: integer

  • default: 2

integer


Examples

  "Layout": {
    "NumberOfColumns": 3
  }


  "Layout": {
    "MinimumInteritemSpacing": 66,
    "NumberOfColumns": 1
  }


  "Layout": {
    "LayoutType": "HorizontalScroll"
  }