Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 7c37150a87124d3e30475c50ba88720452d4b28b
Author: Andrey Kulikov <andreykulikov@google.com>
Date: Thu Oct 22 20:10:27 2020
Made ZIndexModifier internal
It will allow us to later migrate Modifier.zIndex() implementation without the breaking change to work as LayoutModifier where we provide zIndex right as a param for placeable.place() call.
Relnote: ZIndexModifier is now internal
Bug: 171493718
Test: DrawReorderingTest
Change-Id: I1808b23b35c21e8f814b39a87b37a8a2088da951
M compose/ui/ui/api/current.txt
M compose/ui/ui/api/public_plus_experimental_current.txt
M compose/ui/ui/api/restricted_current.txt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/ZIndexModifier.kt
https://android-review.googlesource.com/1470853
Branch: androidx-master-dev
commit 7c37150a87124d3e30475c50ba88720452d4b28b
Author: Andrey Kulikov <andreykulikov@google.com>
Date: Thu Oct 22 20:10:27 2020
Made ZIndexModifier internal
It will allow us to later migrate Modifier.zIndex() implementation without the breaking change to work as LayoutModifier where we provide zIndex right as a param for placeable.place() call.
Relnote: ZIndexModifier is now internal
Bug: 171493718
Test: DrawReorderingTest
Change-Id: I1808b23b35c21e8f814b39a87b37a8a2088da951
M compose/ui/ui/api/current.txt
M compose/ui/ui/api/public_plus_experimental_current.txt
M compose/ui/ui/api/restricted_current.txt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/ZIndexModifier.kt
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-master-dev
commit fa215832cc7f36fd49d1d677e8d71b65c8acd4b6
Author: Andrey Kulikov <andreykulikov@google.com>
Date: Fri Nov 06 16:43:55 2020
Add zIndex param for the PlacementScope's place()
Relnote: Add zIndex param for the PlacementScope's place() so Modifier.zIndex() now works as a LayoutModifier and any custom layout can set zIndexes for their children right in the placement block
Fixes: 171493718
Test: DrawReorderingTest
Change-Id: I711f7165ad321434c57082f4277c6623219102b0
M compose/ui/ui/api/current.txt
M compose/ui/ui/api/public_plus_experimental_current.txt
M compose/ui/ui/api/restricted_current.txt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/AndroidLayoutDrawTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/draw/DrawReorderingTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/draw/DrawShadowTest.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/ZIndexModifier.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/layout/Layout.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/layout/LayoutModifier.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/layout/Placeable.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/DelegatingLayoutNodeWrapper.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/InnerPlaceable.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/LayerWrapper.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/LayoutNode.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/LayoutNodeWrapper.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/ModifiedLayoutNode.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/OuterMeasurablePlaceable.kt
M compose/ui/ui/src/test/kotlin/androidx/compose/ui/node/LayoutNodeTest.kt
https://android-review.googlesource.com/1490857
Branch: androidx-master-dev
commit fa215832cc7f36fd49d1d677e8d71b65c8acd4b6
Author: Andrey Kulikov <andreykulikov@google.com>
Date: Fri Nov 06 16:43:55 2020
Add zIndex param for the PlacementScope's place()
Relnote: Add zIndex param for the PlacementScope's place() so Modifier.zIndex() now works as a LayoutModifier and any custom layout can set zIndexes for their children right in the placement block
Fixes: 171493718
Test: DrawReorderingTest
Change-Id: I711f7165ad321434c57082f4277c6623219102b0
M compose/ui/ui/api/current.txt
M compose/ui/ui/api/public_plus_experimental_current.txt
M compose/ui/ui/api/restricted_current.txt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/AndroidLayoutDrawTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/draw/DrawReorderingTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/draw/DrawShadowTest.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/ZIndexModifier.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/layout/Layout.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/layout/LayoutModifier.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/layout/Placeable.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/DelegatingLayoutNodeWrapper.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/InnerPlaceable.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/LayerWrapper.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/LayoutNode.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/LayoutNodeWrapper.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/ModifiedLayoutNode.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/OuterMeasurablePlaceable.kt
M compose/ui/ui/src/test/kotlin/androidx/compose/ui/node/LayoutNodeTest.kt
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 1102527720dfd1d2de0e11e0d769439a3700fb58
Author: Andrey Kulikov <andreykulikov@google.com>
Date: Wed Nov 18 19:23:35 2020
Introduce placeable.placeWithLayer
We decided to integrate functionality currently available as DrawLayerModifier right inside the Layout system.
Why to do so:
1) To allow custom layouts to insert the layers for the children if they need to. For example It is needed in LazyColumn as an optimization ( b/170296989 )
2) Allows to simplify the system by having less concepts. Now DrawLayerModifier is a whole separate concept. With integrating layers right inside the layout system Modifier.drawLayer() will be implemented just as a simple LayoutModifier with DrawLayerModifier class being removed. We already did the same thing with ZIndexModifier ( b/171493718 )
Relnote: New methods placeable.placeWithLayer() and placeable.placeRelativeWithLayer() were added which allows custom layouts and layout modifiers to place a child with introducing a graphics layer for their drawing. Having that we can first optimize redrawings, so when we need to move a child we don't have to redraw its content, second we can apply draw transformations for a child
Bug: 173030831
Test: New tests, existing tests are passing
Change-Id: Ibd8f6bb03f391c3f1bbf13f659d79e3b57019a46
M compose/ui/ui-tooling/src/androidTest/java/androidx/compose/ui/tooling/BoundsTest.kt
M compose/ui/ui-tooling/src/androidTest/java/androidx/compose/ui/tooling/ModifierInfoTest.kt
M compose/ui/ui/api/current.txt
M compose/ui/ui/api/public_plus_experimental_current.txt
M compose/ui/ui/api/restricted_current.txt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/AndroidLayoutDrawTest.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeView.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/DrawLayerModifier.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/layout/Layout.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/layout/LayoutModifier.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/layout/Placeable.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/layout/RootMeasureBlocks.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/DelegatingLayoutNodeWrapper.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/InnerPlaceable.kt
D compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/LayerWrapper.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/LayoutNode.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/LayoutNodeWrapper.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/ModifiedDrawNode.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/ModifiedLayoutNode.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/OuterMeasurablePlaceable.kt
M compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/platform/DesktopOwner.kt
M compose/ui/ui/src/test/kotlin/androidx/compose/ui/node/LayoutNodeTest.kt
https://android-review.googlesource.com/1503751
Branch: androidx-master-dev
commit 1102527720dfd1d2de0e11e0d769439a3700fb58
Author: Andrey Kulikov <andreykulikov@google.com>
Date: Wed Nov 18 19:23:35 2020
Introduce placeable.placeWithLayer
We decided to integrate functionality currently available as DrawLayerModifier right inside the Layout system.
Why to do so:
1) To allow custom layouts to insert the layers for the children if they need to. For example It is needed in LazyColumn as an optimization (
2) Allows to simplify the system by having less concepts. Now DrawLayerModifier is a whole separate concept. With integrating layers right inside the layout system Modifier.drawLayer() will be implemented just as a simple LayoutModifier with DrawLayerModifier class being removed. We already did the same thing with ZIndexModifier (
Relnote: New methods placeable.placeWithLayer() and placeable.placeRelativeWithLayer() were added which allows custom layouts and layout modifiers to place a child with introducing a graphics layer for their drawing. Having that we can first optimize redrawings, so when we need to move a child we don't have to redraw its content, second we can apply draw transformations for a child
Bug: 173030831
Test: New tests, existing tests are passing
Change-Id: Ibd8f6bb03f391c3f1bbf13f659d79e3b57019a46
M compose/ui/ui-tooling/src/androidTest/java/androidx/compose/ui/tooling/BoundsTest.kt
M compose/ui/ui-tooling/src/androidTest/java/androidx/compose/ui/tooling/ModifierInfoTest.kt
M compose/ui/ui/api/current.txt
M compose/ui/ui/api/public_plus_experimental_current.txt
M compose/ui/ui/api/restricted_current.txt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/AndroidLayoutDrawTest.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeView.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/DrawLayerModifier.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/layout/Layout.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/layout/LayoutModifier.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/layout/Placeable.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/layout/RootMeasureBlocks.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/DelegatingLayoutNodeWrapper.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/InnerPlaceable.kt
D compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/LayerWrapper.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/LayoutNode.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/LayoutNodeWrapper.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/ModifiedDrawNode.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/ModifiedLayoutNode.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/OuterMeasurablePlaceable.kt
M compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/platform/DesktopOwner.kt
M compose/ui/ui/src/test/kotlin/androidx/compose/ui/node/LayoutNodeTest.kt
Description
Layout(...) { measurebles, constraints ->
layout(100, 100) {
val placeable = measurables.first.measure(constraints)
placeable.place(0, 0, zIndex = 8)
}
}
With such approach x, y and z are logically connected and Layouts can control children's zIndex in a way they need.
Also instead of a separate ZIndexModifier Modifier.zIndex() will then be implemented as just a LayoutModifier