Skip to content
This repository was archived by the owner on Dec 27, 2024. It is now read-only.

Commit 47292e3

Browse files
committed
[Compose] Small fix and gone for MotionLayout (#506)
* [Compose] Small fix and gone for MotionLayout We should not have a default LayoutInformationReceiverFlag that is not None. Gone is now animated as expected in MotionLayout. Added Example with test. * Delete empty file
1 parent 3d2c70c commit 47292e3

File tree

5 files changed

+512
-2
lines changed

5 files changed

+512
-2
lines changed

constraintlayout/compose/src/main/java/androidx/constraintlayout/compose/ConstraintLayout.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ internal abstract class EditableJSONLayout(@Language("json5") content: String) :
668668
private var forcedHeight: Int = Int.MIN_VALUE
669669
private var forcedDrawDebug: MotionLayoutDebugFlags = MotionLayoutDebugFlags.UNKNOWN
670670
private var updateFlag: MutableState<Long>? = null
671-
private var layoutInformationMode: LayoutInfoFlags = LayoutInfoFlags.BOUNDS
671+
private var layoutInformationMode: LayoutInfoFlags = LayoutInfoFlags.NONE
672672
private var layoutInformation = ""
673673
private var last = System.nanoTime()
674674
private var debugName : String? = null

constraintlayout/compose/src/main/java/androidx/constraintlayout/compose/MotionLayout.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -701,6 +701,7 @@ internal class MotionMeasurer : Measurer() {
701701
state.reset()
702702
constraintSet.applyTo(state, measurables)
703703
state.apply(root)
704+
root.children.fastForEach { it.isAnimated = true }
704705
applyRootSize(constraints)
705706
root.updateHierarchy()
706707

projects/ComposeConstraintLayout/app/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ dependencies {
6262
implementation "androidx.activity:activity-compose:1.3.0"
6363

6464
implementation "androidx.compose.material:material:$compose_version"
65+
implementation "androidx.compose.material:material-icons-extended:$compose_version"
6566
implementation "androidx.compose.ui:ui:$compose_version"
6667
implementation "androidx.compose.ui:ui-unit:$compose_version"
6768
implementation "androidx.compose.ui:ui-util:$compose_version"

0 commit comments

Comments
 (0)