public class Barrier extends Helper


Summary

Public constructors

Barrier(String name, String config)

Public methods

Barrier

Add a new reference

Barrier

Add a new reference

Constraint.Side

Get the direction of the Barrier

int

Get the margin of the Barrier

String

Convert references into a String representation

void

Set the direction of the Barrier

void
setMargin(int margin)

Set the margin of the Barrier

Inherited Constants

From androidx.constraintlayout.core.dsl.Helper
static final Map<Constraint.SideString>
static final Map<Helper.TypeString>

Public constructors

Barrier

Added in 1.1.0
public Barrier(String name)

Barrier

Added in 1.1.0
public Barrier(String name, String config)

Public methods

addReference

Added in 1.1.0
public Barrier addReference(Ref ref)

Add a new reference

Parameters
Ref ref

reference

Returns
Barrier

Barrier

addReference

Added in 1.1.0
public Barrier addReference(String ref)

Add a new reference

Parameters
String ref

reference in a String representation

Returns
Barrier

Chain

getDirection

Added in 1.1.0
public Constraint.Side getDirection()

Get the direction of the Barrier

Returns
Constraint.Side

direction

getMargin

Added in 1.1.0
public int getMargin()

Get the margin of the Barrier

Returns
int

margin

referencesToString

Added in 1.1.0
public String referencesToString()

Convert references into a String representation

Returns
String

a String representation of references

setDirection

Added in 1.1.0
public void setDirection(Constraint.Side direction)

Set the direction of the Barrier

Parameters
Constraint.Side direction

setMargin

Added in 1.1.0
public void setMargin(int margin)

Set the margin of the Barrier

Parameters
int margin