API & Integration -> RenderScript

Composition properties in RenderScript

These properties extend the base element properties.

Dimensions

The width and height of the composition. When set to null, the composition takes the size of the elements in its auto layout.

Example

"width": "100%", "height": "100%",

Defaults

"width": "100%", "height": "100%",

Auto layout

Arranges the elements that join the layout, which are those with x or y set to null, in a column or a row. flow_direction is vertical or horizontal, flow_gap is the space between the elements, and flow_justify (start, center, end or space-between) places them when space is left over.

Example

"flow_direction": "horizontal", "flow_gap": "2 vmin", "flow_justify": "center",

Defaults

"flow_direction": "vertical", "flow_gap": "0 vmin", "flow_justify": "start",