KotlinConstraintSet

ConstraintSet Utility

Constructors

Link copied to clipboard
constructor()

Create

Properties

Link copied to clipboard
Link copied to clipboard
var margin: Int?

The view's margin

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Transition flag, true to enable transitions, false otherwise

Functions

Link copied to clipboard
open fun addColorAttributes(vararg attributeName: String)
Link copied to clipboard
open fun addFloatAttributes(vararg attributeName: String)
Link copied to clipboard
open fun addIntAttributes(vararg attributeName: String)
Link copied to clipboard
open fun addStringAttributes(vararg attributeName: String)
Link copied to clipboard
open fun addToHorizontalChain(viewId: Int, leftId: Int, rightId: Int)
Link copied to clipboard
open fun addToHorizontalChainRTL(viewId: Int, leftId: Int, rightId: Int)
Link copied to clipboard
open fun addToVerticalChain(viewId: Int, topId: Int, bottomId: Int)
Link copied to clipboard
infix fun appliesTo(constraintLayout: ConstraintLayout)

Apply constraints to a ConstraintLayout,

Link copied to clipboard
open fun applyCustomAttributes(constraintLayout: ConstraintLayout)
Link copied to clipboard
Link copied to clipboard
open fun applyTo(constraintLayout: ConstraintLayout)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun applyToWithoutCustom(constraintLayout: ConstraintLayout)
Link copied to clipboard
infix fun Int.bottomToBottomOf(bottom: Int)

Set the view's bottom constraint to bottom of another view

Link copied to clipboard
infix fun Int.bottomToTopOf(top: Int)

Set the view's bottom constraint to top of another view

Link copied to clipboard
open fun center(centerID: Int, firstID: Int, firstSide: Int, firstMargin: Int, secondId: Int, secondSide: Int, secondMargin: Int, bias: Float)
Link copied to clipboard
open fun centerHorizontally(viewId: Int, toView: Int)
open fun centerHorizontally(centerID: Int, leftId: Int, leftSide: Int, leftMargin: Int, rightId: Int, rightSide: Int, rightMargin: Int, bias: Float)
Link copied to clipboard
open fun centerHorizontallyRtl(viewId: Int, toView: Int)
open fun centerHorizontallyRtl(centerID: Int, startId: Int, startSide: Int, startMargin: Int, endId: Int, endSide: Int, endMargin: Int, bias: Float)
Link copied to clipboard
open fun centerVertically(viewId: Int, toView: Int)
open fun centerVertically(centerID: Int, topId: Int, topSide: Int, topMargin: Int, bottomId: Int, bottomSide: Int, bottomMargin: Int, bias: Float)
Link copied to clipboard
open fun clear(viewId: Int)
open fun clear(viewId: Int, anchor: Int)
Link copied to clipboard
infix fun Int.clear(constraint: Constraints)

Clear a constraint of a view

Link copied to clipboard
open fun clone(constraintLayout: ConstraintLayout)
open fun clone(set: ConstraintSet)
open fun clone(constraints: Constraints)
open fun clone(context: Context, constraintLayoutId: Int)
Link copied to clipboard
infix fun clones(constraintLayout: ConstraintLayout)

Copy the layout parameters of a ConstraintLayout

Link copied to clipboard
open fun connect(startID: Int, startSide: Int, endID: Int, endSide: Int)
open fun connect(startID: Int, startSide: Int, endID: Int, endSide: Int, margin: Int)
Link copied to clipboard
open fun constrainCircle(viewId: Int, id: Int, radius: Int, angle: Float)
Link copied to clipboard
open fun constrainDefaultHeight(viewId: Int, height: Int)
Link copied to clipboard
open fun constrainDefaultWidth(viewId: Int, width: Int)
Link copied to clipboard
open fun constrainedHeight(viewId: Int, constrained: Boolean)
Link copied to clipboard
open fun constrainedWidth(viewId: Int, constrained: Boolean)
Link copied to clipboard
open fun constrainHeight(viewId: Int, height: Int)
Link copied to clipboard
open fun constrainMaxHeight(viewId: Int, height: Int)
Link copied to clipboard
open fun constrainMaxWidth(viewId: Int, width: Int)
Link copied to clipboard
open fun constrainMinHeight(viewId: Int, height: Int)
Link copied to clipboard
open fun constrainMinWidth(viewId: Int, width: Int)
Link copied to clipboard
open fun constrainPercentHeight(viewId: Int, percent: Float)
Link copied to clipboard
open fun constrainPercentWidth(viewId: Int, percent: Float)
Link copied to clipboard
open fun constrainWidth(viewId: Int, width: Int)
Link copied to clipboard
open fun create(guidelineID: Int, orientation: Int)
Link copied to clipboard
open fun createBarrier(id: Int, direction: Int, margin: Int, vararg referenced: Int)
Link copied to clipboard
open fun createHorizontalChain(leftId: Int, leftSide: Int, rightId: Int, rightSide: Int, chainIds: IntArray, weights: FloatArray, style: Int)
Link copied to clipboard
open fun createHorizontalChainRtl(startId: Int, startSide: Int, endId: Int, endSide: Int, chainIds: IntArray, weights: FloatArray, style: Int)
Link copied to clipboard
open fun createVerticalChain(topId: Int, topSide: Int, bottomId: Int, bottomSide: Int, chainIds: IntArray, weights: FloatArray, style: Int)
Link copied to clipboard
open fun dump(scene: MotionScene, vararg ids: Int)
Link copied to clipboard
infix fun Int.endToEndOf(end: Int)

Set the view's end constraint to end of another view

Link copied to clipboard
infix fun Int.endToStartOf(start: Int)

Set the view's end constraint to start of another view

Link copied to clipboard
open fun getApplyElevation(viewId: Int): Boolean
Link copied to clipboard
Link copied to clipboard
open fun getHeight(viewId: Int): Int
Link copied to clipboard
open fun getKnownIds(): IntArray
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun getVisibility(viewId: Int): Int
Link copied to clipboard
open fun getVisibilityMode(viewId: Int): Int
Link copied to clipboard
open fun getWidth(viewId: Int): Int
Link copied to clipboard
infix fun Int.guidePercentTo(end: Float)

Set the guideline percentage of a view to the defined value

Link copied to clipboard
open fun isForceId(): Boolean
Link copied to clipboard
open fun load(context: Context, resourceId: Int)
open fun load(context: Context, parser: XmlPullParser)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun readFallback(constraintLayout: ConstraintLayout)
Link copied to clipboard
open fun removeAttribute(attributeName: String)
Link copied to clipboard
open fun removeFromHorizontalChain(viewId: Int)
Link copied to clipboard
open fun removeFromVerticalChain(viewId: Int)
Link copied to clipboard
open fun setAlpha(viewId: Int, alpha: Float)
Link copied to clipboard
open fun setApplyElevation(viewId: Int, apply: Boolean)
Link copied to clipboard
open fun setBarrierType(id: Int, type: Int)
Link copied to clipboard
open fun setColorValue(viewId: Int, attributeName: String, value: Int)
Link copied to clipboard
open fun setDimensionRatio(viewId: Int, ratio: String)
Link copied to clipboard
open fun setEditorAbsoluteX(viewId: Int, position: Int)
Link copied to clipboard
open fun setEditorAbsoluteY(viewId: Int, position: Int)
Link copied to clipboard
open fun setElevation(viewId: Int, elevation: Float)
Link copied to clipboard
open fun setFloatValue(viewId: Int, attributeName: String, value: Float)
Link copied to clipboard
open fun setForceId(forceId: Boolean)
Link copied to clipboard
open fun setGoneMargin(viewId: Int, anchor: Int, value: Int)
Link copied to clipboard
open fun setGuidelineBegin(guidelineID: Int, margin: Int)
Link copied to clipboard
open fun setGuidelineEnd(guidelineID: Int, margin: Int)
Link copied to clipboard
open fun setGuidelinePercent(guidelineID: Int, ratio: Float)
Link copied to clipboard
open fun setHorizontalBias(viewId: Int, bias: Float)
Link copied to clipboard
open fun setHorizontalChainStyle(viewId: Int, chainStyle: Int)
Link copied to clipboard
open fun setHorizontalWeight(viewId: Int, weight: Float)
Link copied to clipboard
open fun setIntValue(viewId: Int, attributeName: String, value: Int)
Link copied to clipboard
open fun setLayoutWrapBehavior(viewId: Int, behavior: Int)
Link copied to clipboard
open fun setMargin(viewId: Int, anchor: Int, value: Int)
Link copied to clipboard
open fun setReferencedIds(id: Int, vararg referenced: Int)
Link copied to clipboard
open fun setRotation(viewId: Int, rotation: Float)
Link copied to clipboard
open fun setRotationX(viewId: Int, rotationX: Float)
Link copied to clipboard
open fun setRotationY(viewId: Int, rotationY: Float)
Link copied to clipboard
open fun setScaleX(viewId: Int, scaleX: Float)
Link copied to clipboard
open fun setScaleY(viewId: Int, scaleY: Float)
Link copied to clipboard
open fun setStringValue(viewId: Int, attributeName: String, value: String)
Link copied to clipboard
open fun setTransformPivot(viewId: Int, transformPivotX: Float, transformPivotY: Float)
Link copied to clipboard
open fun setTransformPivotX(viewId: Int, transformPivotX: Float)
Link copied to clipboard
open fun setTransformPivotY(viewId: Int, transformPivotY: Float)
Link copied to clipboard
open fun setTranslation(viewId: Int, translationX: Float, translationY: Float)
Link copied to clipboard
open fun setTranslationX(viewId: Int, translationX: Float)
Link copied to clipboard
open fun setTranslationY(viewId: Int, translationY: Float)
Link copied to clipboard
open fun setTranslationZ(viewId: Int, translationZ: Float)
Link copied to clipboard
open fun setValidateOnParse(validate: Boolean)
Link copied to clipboard
open fun setVerticalBias(viewId: Int, bias: Float)
Link copied to clipboard
open fun setVerticalChainStyle(viewId: Int, chainStyle: Int)
Link copied to clipboard
open fun setVerticalWeight(viewId: Int, weight: Float)
Link copied to clipboard
open fun setVisibility(viewId: Int, visibility: Int)
Link copied to clipboard
open fun setVisibilityMode(viewId: Int, visibilityMode: Int)
Link copied to clipboard
infix fun Int.startToEndOf(end: Int)

Set the view's start constraint to end of another view

Link copied to clipboard
infix fun Int.startToStartOf(end: Int)

Set the view's start constraint to start of another view

Link copied to clipboard
infix fun Int.topToBottomOf(bottom: Int)

Set the view's top constraint to bottom of another view

Link copied to clipboard
infix fun Int.topToTopOf(top: Int)

Set the view's top constraint to top of another view

Link copied to clipboard
open fun writeState(writer: Writer, layout: ConstraintLayout, flags: Int)