Layer
class Layer : ConstraintHelper
| kotlin.Any | |||
| ↳ | android.view.View | ||
| ↳ | androidx.constraintlayout.widget.ConstraintHelper | ||
| ↳ | androidx.constraintlayout.helper.widget.Layer |
Layer adds the ability to move and rotate a group of views as if they were contained in a viewGroup Added in 2.0 Methods such as setRotation(float) rotate all views about a common center. For simple visibility manipulation use Group
Summary
Public constructors |
|---|
Layer(context: Context!, attrs: AttributeSet!) |
Layer(context: Context!, attrs: AttributeSet!, defStyleAttr: Int) |
Public functions |
|
|---|---|
Unit |
setElevation(elevation: Float) |
Unit |
Sets the pivot point for scale operations. |
Unit |
Sets the pivot point for scale operations. |
Unit |
setRotation(angle: Float)Rotates all associated views around a single point post layout.. |
Unit |
Scales all associated views around a single point post layout.. |
Unit |
Scales all associated views around a single point post layout.. |
Unit |
setTranslationX(dx: Float)Shift all the views in the X direction post layout. |
Unit |
setTranslationY(dy: Float)Shift all the views in the Y direction post layout. |
Unit |
setVisibility(visibility: Int) |
Unit |
updatePostLayout(container: ConstraintLayout!) |
Unit |
updatePreDraw(container: ConstraintLayout!) |
Protected functions |
|
|---|---|
Unit |
applyLayoutFeaturesInConstraintSet(container: ConstraintLayout!) |
Unit |
|
Unit |
init(attrs: AttributeSet!) |
Unit |
Inherited Constants |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Inherited properties |
|---|
Public constructors
Public functions
setPivotX
fun setPivotX(pivotX: Float): Unit
Sets the pivot point for scale operations. Setting it to Float.NaN (default) results in the center of the group being used.
| Parameters | |
|---|---|
pivotX: Float |
The X location of the pivot point |
setPivotY
fun setPivotY(pivotY: Float): Unit
Sets the pivot point for scale operations. Setting it to Float.NaN (default) results in the center of the group being used.
| Parameters | |
|---|---|
pivotY: Float |
The Y location of the pivot point |
setRotation
fun setRotation(angle: Float): Unit
Rotates all associated views around a single point post layout.. The point is the middle of the bounding box or set by setPivotX,setPivotX;
| Parameters | |
|---|---|
angle: Float |
setScaleX
fun setScaleX(scaleX: Float): Unit
Scales all associated views around a single point post layout.. The point is the middle of the bounding box or set by setPivotX,setPivotX;
| Parameters | |
|---|---|
scaleX: Float |
The value to scale in X. |
setScaleY
fun setScaleY(scaleY: Float): Unit
Scales all associated views around a single point post layout.. The point is the middle of the bounding box or set by setPivotX,setPivotX;
| Parameters | |
|---|---|
scaleY: Float |
The value to scale in X. |
setTranslationX
fun setTranslationX(dx: Float): Unit
Shift all the views in the X direction post layout.
| Parameters | |
|---|---|
dx: Float |
number of pixes to shift |
setTranslationY
fun setTranslationY(dy: Float): Unit
Shift all the views in the Y direction post layout.
| Parameters | |
|---|---|
dy: Float |
number of pixes to shift |
updatePostLayout
fun updatePostLayout(container: ConstraintLayout!): Unit
| Parameters | |
|---|---|
container: ConstraintLayout! |
updatePreDraw
fun updatePreDraw(container: ConstraintLayout!): Unit
| Parameters | |
|---|---|
container: ConstraintLayout! |
Protected functions
applyLayoutFeaturesInConstraintSet
protected fun applyLayoutFeaturesInConstraintSet(container: ConstraintLayout!): Unit
| Parameters | |
|---|---|
container: ConstraintLayout! |