Last active
August 1, 2021 20:43
-
-
Save GRizzi91/4f68ccc4b904236903741150fbf21351 to your computer and use it in GitHub Desktop.
ExpandableStackView
This file contains 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
fun setAdapter(adapter: BaseAdapter) { | |
val scene = MotionScene(this) | |
val startSetId = View.generateViewId() | |
val startSet = ConstraintSet() | |
startSet.clone(this) | |
val endSetId = View.generateViewId() | |
val endSet = ConstraintSet() | |
endSet.clone(this) | |
val transitionId = View.generateViewId() | |
val transaction = TransitionBuilder.buildTransition( | |
scene, | |
transitionId, | |
startSetId, startSet, | |
endSetId, endSet | |
) | |
transaction.duration = 1000 | |
scene.addTransition(transaction) | |
scene.setTransition(transaction) | |
setScene(scene) | |
setTransition(transitionId) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment