Linear Control Group

Defined in package com.scandit.datacapture.core.ui

LinearControlGroupOrientation

Added in version 6.14.0

The orientation in which a LinearControlGroup will render its child controls.

VERTICAL

Added in version 6.14.0

Vertical orientation.

HORIZONTAL

Added in version 6.14.0

Horizontal orientation.

LinearControlGroupBuilder
class LinearControlGroupBuilder

Added in version 6.14.0

The builder class to construct a LinearControlGroup.

LinearControlGroupBuilder()
LinearControlGroupBuilder(context: Context)

Added in version 6.14.0

Constructs a new builder.

setOrientation(orientation)
fun setOrientation(orientation: LinearControlGroupOrientation): LinearControlGroupBuilder

Added in version 6.14.0

Set the orientation for the LinearControlGroup being built. Returns the current builder instance for easy chaining. Defaults to Vertical.

setSpacing(spacing)
fun setSpacing(spacing: FloatWithUnit): LinearControlGroupBuilder

Added in version 6.14.0

Set the spacing to apply between controls inside the LinearControlGroup being built. Returns the current builder instance for easy chaining.

Defaults to 16dp.

setControls(controls)
fun setControls(controls: List<Control>): LinearControlGroupBuilder

Added in version 6.14.0

Set the controls which will be displayed in a row or column inside the LinearControlGroup being built. Returns the current builder instance for easy chaining.

build()
fun build(): LinearControlGroup

Added in version 6.14.0

Builds the LinearControlGroup with the given orientation, spacing and controls.

LinearControlGroup
class LinearControlGroup : Control

Added in version 6.14.0

A Control that contains multiple sub-controls, allowing for LinearControlGroupOrientation and spacing to be specified. This control will arrange child controls either horizontally in a single column or vertically in a single row. Use LinearControlGroupBuilder to build an instance of this control and add to a DataCaptureView by calling DataCaptureView.addControl().

Note

The controls are added from top to bottom when vertical, from left to right when horizontal.

builder(context)
fun LinearControlGroup.builder(context: Context): LinearControlGroupBuilder

Added in version 6.14.0

Returns a linear control group builder, used to setup and build a linear control group.

fromJson(context, json)
fun LinearControlGroup.fromJson(context: Context,
        json: String): LinearControlGroup

Added in version 6.15.0

Constructs a new linear control group with the provided JSON serialization.

orientation
val orientation: LinearControlGroupOrientation

Added in version 6.14.0

Get the orientation for the LinearControlGroup.

spacing
val spacing: FloatWithUnit

Added in version 6.14.0

Get the spacing applied between controls inside the LinearControlGroup being built.

controls
val controls: List<Control>

Added in version 6.14.0

Get the list of controls currently in this group.