Created
February 4, 2019 17:18
-
-
Save TimCastelijns/c3a94966d928a1bfdf2bbd99ac8c01b9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Devices | |
private val uiView: View = LayoutInflater.from(container.context).inflate(R.layout.devices, container, true) | |
// Menu | |
private val uiView: View = LayoutInflater.from(container.context).inflate(R.layout.menu, container, true) | |
// Constraints | |
private fun layoutUiComponents(rootContainer: ConstraintLayout) { | |
val constraintSet = ConstraintSet() | |
constraintSet.clone(rootContainer) | |
// Devices | |
constraintSet.connect( | |
devicesComponent.getContainerId(), | |
ConstraintSet.TOP, | |
ConstraintSet.PARENT_ID, | |
ConstraintSet.TOP | |
) | |
// Menu | |
constraintSet.connect( | |
menuComponent.getContainerId(), | |
ConstraintSet.TOP, | |
devicesComponent.getContainerId(), | |
ConstraintSet.BOTTOM | |
) | |
constraintSet.connect( | |
menuComponent.getContainerId(), | |
ConstraintSet.BOTTOM, | |
ConstraintSet.PARENT_ID, | |
ConstraintSet.BOTTOM | |
) | |
constraintSet.applyTo(rootContainer) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment