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(@NonNull Context context)
Added in version 6.14.0
Constructs a new builder.
- setOrientation(orientation)
@NonNull LinearControlGroupBuilder setOrientation(LinearControlGroupOrientation orientation)
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)
@NonNull LinearControlGroupBuilder setSpacing(@NonNull FloatWithUnit spacing)
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)
@NonNull LinearControlGroupBuilder setControls(@NonNull List<@NonNull Control> controls)
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()
@NonNull LinearControlGroup build()
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)
static @NonNull LinearControlGroupBuilder builder(@NonNull Context context)
Added in version 6.14.0
Returns a linear control group builder, used to setup and build a linear control group.
- fromJson(context, json)
static @NonNull LinearControlGroup fromJson(@NonNull Context context, @NonNull String json)
Added in version 6.15.0
Constructs a new linear control group with the provided JSON serialization.
- orientation
LinearControlGroupOrientation getOrientation()
Added in version 6.14.0
Get the orientation for the LinearControlGroup.
- spacing
@NonNull FloatWithUnit getSpacing()
Added in version 6.14.0
Get the spacing applied between controls inside the LinearControlGroup being built.