Fixed
Status Update
Comments
so...@google.com <so...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit c8deeacd79052e8df6261e2282f17af292f9d9d8
Author: Mihai Popa <popam@google.com>
Date: Mon Sep 07 12:16:36 2020
Prevent static imports of layout scopes' contents
Relnote: We prevented static imports of contents of layout scopes (e.g. alignWithSiblings in RowScope). The explicit scope alternative should be used instead: `with(RowScope) { Modifier.alignWithSiblings(FirstBaseline) }`.
Fixes: 166760797
Test: built and ran
Change-Id: I216be6984d82e0a41432ac5b89f7d6240eef1b9d
M compose/animation/animation/integration-tests/animation-demos/src/main/java/androidx/compose/animation/demos/EnterExitTransitionDemo.kt
M compose/animation/animation/samples/src/main/java/androidx/compose/animation/samples/AnimatedVisibilitySamples.kt
M compose/desktop/desktop/samples/src/jvmMain/kotlin/androidx/compose/desktop/examples/popupexample/AppContent.kt
M compose/foundation/foundation-layout/api/current.txt
M compose/foundation/foundation-layout/api/public_plus_experimental_current.txt
M compose/foundation/foundation-layout/api/restricted_current.txt
M compose/foundation/foundation-layout/src/commonMain/kotlin/androidx/compose/foundation/layout/Column.kt
M compose/foundation/foundation-layout/src/commonMain/kotlin/androidx/compose/foundation/layout/Row.kt
M compose/foundation/foundation-layout/src/commonMain/kotlin/androidx/compose/foundation/layout/Stack.kt
M compose/material/material/integration-tests/material-demos/src/main/java/androidx/compose/material/demos/MaterialTextField.kt
https://android-review.googlesource.com/1420054
Branch: androidx-master-dev
commit c8deeacd79052e8df6261e2282f17af292f9d9d8
Author: Mihai Popa <popam@google.com>
Date: Mon Sep 07 12:16:36 2020
Prevent static imports of layout scopes' contents
Relnote: We prevented static imports of contents of layout scopes (e.g. alignWithSiblings in RowScope). The explicit scope alternative should be used instead: `with(RowScope) { Modifier.alignWithSiblings(FirstBaseline) }`.
Fixes: 166760797
Test: built and ran
Change-Id: I216be6984d82e0a41432ac5b89f7d6240eef1b9d
M compose/animation/animation/integration-tests/animation-demos/src/main/java/androidx/compose/animation/demos/EnterExitTransitionDemo.kt
M compose/animation/animation/samples/src/main/java/androidx/compose/animation/samples/AnimatedVisibilitySamples.kt
M compose/desktop/desktop/samples/src/jvmMain/kotlin/androidx/compose/desktop/examples/popupexample/AppContent.kt
M compose/foundation/foundation-layout/api/current.txt
M compose/foundation/foundation-layout/api/public_plus_experimental_current.txt
M compose/foundation/foundation-layout/api/restricted_current.txt
M compose/foundation/foundation-layout/src/commonMain/kotlin/androidx/compose/foundation/layout/Column.kt
M compose/foundation/foundation-layout/src/commonMain/kotlin/androidx/compose/foundation/layout/Row.kt
M compose/foundation/foundation-layout/src/commonMain/kotlin/androidx/compose/foundation/layout/Stack.kt
M compose/material/material/integration-tests/material-demos/src/main/java/androidx/compose/material/demos/MaterialTextField.kt
Description
As of Compose
1.0.0-alpha01
bothRowScope
andColumnScope
are declared as object which allows methods inside it to be statically imported which causes a lot of confusion. Here is one such example:Instead these types of scopes should be interfaces to prevent static imports.