Modifier.drawBackground -> Modifier.background
This CL renamed drawBackground modifier to just background for better readability.
While renaming API, this CL also cuts unnecessary APIs from this modifiers that might confuse users, like alpha in color version or fill type, as background always fills
Relnote: Modifier.drawBackground has been renamed to Modifier.background
Fixes: 159612389
Test: renamed and should pass
Change-Id: I1367723fce0e07418ed4ab391fe20c69aa092f53
diff --git a/compose/compose-runtime/compose-runtime-benchmark/src/androidTest/java/androidx/compose/benchmark/ComposeBenchmark.kt b/compose/compose-runtime/compose-runtime-benchmark/src/androidTest/java/androidx/compose/benchmark/ComposeBenchmark.kt
index c4b2ecc..c5eb922 100644
--- a/compose/compose-runtime/compose-runtime-benchmark/src/androidTest/java/androidx/compose/benchmark/ComposeBenchmark.kt
+++ b/compose/compose-runtime/compose-runtime-benchmark/src/androidTest/java/androidx/compose/benchmark/ComposeBenchmark.kt
@@ -27,7 +27,7 @@
import androidx.ui.core.Modifier
import androidx.ui.core.drawBehind
import androidx.ui.foundation.Box
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.graphics.Color
import androidx.ui.layout.fillMaxSize
import org.junit.FixMethodOrder
@@ -175,7 +175,7 @@
Color.Red -> redModifier
Color.Black -> blackModifier
Color.Yellow -> yellowModifier
- else -> Modifier.fillMaxSize().drawBackground(color)
+ else -> Modifier.fillMaxSize().background(color = color)
}
}
diff --git a/compose/compose-runtime/compose-runtime-benchmark/src/androidTest/java/androidx/compose/benchmark/deeptree/DeepTree.kt b/compose/compose-runtime/compose-runtime-benchmark/src/androidTest/java/androidx/compose/benchmark/deeptree/DeepTree.kt
index 1b034628..b733fec 100644
--- a/compose/compose-runtime/compose-runtime-benchmark/src/androidTest/java/androidx/compose/benchmark/deeptree/DeepTree.kt
+++ b/compose/compose-runtime/compose-runtime-benchmark/src/androidTest/java/androidx/compose/benchmark/deeptree/DeepTree.kt
@@ -19,7 +19,7 @@
import androidx.compose.Composable
import androidx.ui.core.Modifier
import androidx.ui.foundation.Box
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.graphics.Color
import androidx.ui.layout.Column
import androidx.ui.layout.Row
@@ -27,9 +27,9 @@
import androidx.ui.layout.fillMaxSize
import androidx.ui.layout.fillMaxWidth
-val blueBackground = Modifier.drawBackground(Color.Blue)
-val magentaBackground = Modifier.drawBackground(Color.Magenta)
-val blackBackground = Modifier.drawBackground(Color.Black)
+val blueBackground = Modifier.background(color = Color.Blue)
+val magentaBackground = Modifier.background(color = Color.Magenta)
+val blackBackground = Modifier.background(color = Color.Black)
@Composable
fun Terminal(style: Int) {
diff --git a/compose/compose-runtime/compose-runtime-benchmark/src/androidTest/java/androidx/compose/benchmark/realworld4/RealWorld4_Widgets.kt b/compose/compose-runtime/compose-runtime-benchmark/src/androidTest/java/androidx/compose/benchmark/realworld4/RealWorld4_Widgets.kt
index 21bf639..a463f70 100644
--- a/compose/compose-runtime/compose-runtime-benchmark/src/androidTest/java/androidx/compose/benchmark/realworld4/RealWorld4_Widgets.kt
+++ b/compose/compose-runtime/compose-runtime-benchmark/src/androidTest/java/androidx/compose/benchmark/realworld4/RealWorld4_Widgets.kt
@@ -31,7 +31,7 @@
import androidx.ui.layout.Column
import androidx.ui.layout.padding
import androidx.ui.foundation.Box
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.layout.Row
import androidx.ui.layout.fillMaxSize
import androidx.ui.layout.fillMaxWidth
@@ -54,7 +54,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_001(
@@ -124,7 +124,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_002(
@@ -172,7 +172,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_003(
@@ -269,7 +269,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_004(
@@ -372,7 +372,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_005(
@@ -460,7 +460,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_133(
@@ -571,7 +571,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_070(
@@ -637,7 +637,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_071(
@@ -716,7 +716,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_012(
@@ -763,7 +763,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_123(
@@ -818,7 +818,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -856,7 +856,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -893,7 +893,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_091(
@@ -956,7 +956,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -995,7 +995,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -1040,7 +1040,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_119(
@@ -1099,7 +1099,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_057(
@@ -1169,7 +1169,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -1223,7 +1223,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_147(
@@ -1280,7 +1280,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -1331,7 +1331,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -1364,7 +1364,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -1416,7 +1416,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_015(
@@ -1499,7 +1499,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp5 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2 + tmp3 + tmp4
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp5.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp5.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_094(
@@ -1552,7 +1552,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_048(
@@ -1599,7 +1599,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_138(
@@ -1660,7 +1660,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -1699,7 +1699,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -1749,7 +1749,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -1792,7 +1792,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_016(
@@ -1839,7 +1839,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_121(
@@ -1887,7 +1887,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -1928,7 +1928,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp5 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2 + tmp3 + tmp4
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp5.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp5.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -1967,7 +1967,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_063(
@@ -2022,7 +2022,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -2067,7 +2067,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -2106,7 +2106,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -2158,7 +2158,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_076(
@@ -2258,7 +2258,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp5 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2 + tmp3 + tmp4
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp5.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp5.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_054(
@@ -2309,7 +2309,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_041(
@@ -2368,7 +2368,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_053(
@@ -2415,7 +2415,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_089(
@@ -2487,7 +2487,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -2545,7 +2545,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp5 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2 + tmp3 + tmp4
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp5.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp5.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_097(
@@ -2611,7 +2611,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp5 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2 + tmp3 + tmp4
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp5.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp5.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_124(
@@ -2697,7 +2697,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp5 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2 + tmp3 + tmp4
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp5.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp5.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_105(
@@ -2744,7 +2744,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_103(
@@ -2785,7 +2785,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -2824,7 +2824,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -2863,7 +2863,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_107(
@@ -2924,7 +2924,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -2963,7 +2963,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -3002,7 +3002,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -3040,7 +3040,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -3070,7 +3070,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_056(
@@ -3145,7 +3145,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_021(
@@ -3200,7 +3200,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_128(
@@ -3261,7 +3261,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp5 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2 + tmp3 + tmp4
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp5.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp5.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -3294,7 +3294,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_067(
@@ -3351,7 +3351,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -3389,7 +3389,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -3425,7 +3425,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -3462,7 +3462,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_019(
@@ -3523,7 +3523,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -3562,7 +3562,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -3606,7 +3606,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -3649,7 +3649,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -3700,7 +3700,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -3750,7 +3750,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp5 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2 + tmp3 + tmp4
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp5.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp5.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_140(
@@ -3815,7 +3815,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_092(
@@ -3879,7 +3879,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_029(
@@ -3950,7 +3950,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp5 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2 + tmp3 + tmp4
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp5.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp5.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_073(
@@ -4019,7 +4019,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_118(
@@ -4066,7 +4066,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_074(
@@ -4112,7 +4112,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -4151,7 +4151,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_022(
@@ -4202,7 +4202,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_077(
@@ -4309,7 +4309,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_058(
@@ -4361,7 +4361,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_126(
@@ -4418,7 +4418,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -4458,7 +4458,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_112(
@@ -4538,7 +4538,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp5 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2 + tmp3 + tmp4
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp5.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp5.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_083(
@@ -4609,7 +4609,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_084(
@@ -4664,7 +4664,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_042(
@@ -4707,7 +4707,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -4740,7 +4740,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_088(
@@ -4798,7 +4798,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_111(
@@ -4854,7 +4854,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -4891,7 +4891,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_011(
@@ -4938,7 +4938,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -4982,7 +4982,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -5019,7 +5019,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -5059,7 +5059,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_044(
@@ -5117,7 +5117,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_096(
@@ -5190,7 +5190,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp5 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2 + tmp3 + tmp4
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp5.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp5.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_014(
@@ -5243,7 +5243,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -5288,7 +5288,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_109(
@@ -5349,7 +5349,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_062(
@@ -5415,7 +5415,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_036(
@@ -5468,7 +5468,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -5513,7 +5513,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_049(
@@ -5578,7 +5578,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_047(
@@ -5641,7 +5641,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -5679,7 +5679,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -5722,7 +5722,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -5761,7 +5761,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_026(
@@ -5817,7 +5817,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -5862,7 +5862,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -5901,7 +5901,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -5934,7 +5934,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -5985,7 +5985,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -6028,7 +6028,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp5 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2 + tmp3 + tmp4
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp5.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp5.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -6061,7 +6061,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_116(
@@ -6120,7 +6120,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_114(
@@ -6191,7 +6191,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -6242,7 +6242,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -6281,7 +6281,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_117(
@@ -6328,7 +6328,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -6367,7 +6367,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -6406,7 +6406,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_130(
@@ -6449,7 +6449,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -6494,7 +6494,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -6549,7 +6549,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp5 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2 + tmp3 + tmp4
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp5.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp5.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -6594,7 +6594,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -6639,7 +6639,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_125(
@@ -6686,7 +6686,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -6725,7 +6725,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -6758,7 +6758,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -6803,7 +6803,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -6842,7 +6842,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -6875,7 +6875,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -6922,7 +6922,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_132(
@@ -6998,7 +6998,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_006(
@@ -7133,7 +7133,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_134(
@@ -7191,7 +7191,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_097(
@@ -7254,7 +7254,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_136(
@@ -7301,7 +7301,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_051(
@@ -7368,7 +7368,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -7401,7 +7401,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -7435,7 +7435,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_141(
@@ -7496,7 +7496,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_076(
@@ -7573,7 +7573,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_092(
@@ -7636,7 +7636,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_071(
@@ -7728,7 +7728,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_144(
@@ -7825,7 +7825,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp5 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2 + tmp3 + tmp4
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp5.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp5.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_018(
@@ -7890,7 +7890,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_057(
@@ -7973,7 +7973,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_034(
@@ -8056,7 +8056,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp5 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2 + tmp3 + tmp4
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp5.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp5.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
Box(Modifier.fillMaxWidth().weight(1f), backgroundColor = model.toColor())
@@ -8094,7 +8094,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_041(
@@ -8161,7 +8161,7 @@
}.map { it.toString().reversed() }.joinToString("-"))
val tmp3 = "lkjzndgke84ts" + tmp0 + tmp1 + tmp2
WithConstraints(modifier) {
- Box(Modifier.padding(1.dp).drawBackground(color = tmp3.toColor())) {
+ Box(Modifier.padding(1.dp).background(color = tmp3.toColor())) {
if (constraints.maxHeight > constraints.maxWidth) {
Column {
RealWorld4_FancyWidget_087(
diff --git a/compose/compose-runtime/compose-runtime-benchmark/src/androidTest/java/androidx/compose/benchmark/siblings/SiblingManagement.kt b/compose/compose-runtime/compose-runtime-benchmark/src/androidTest/java/androidx/compose/benchmark/siblings/SiblingManagement.kt
index 859bb51..557f924 100644
--- a/compose/compose-runtime/compose-runtime-benchmark/src/androidTest/java/androidx/compose/benchmark/siblings/SiblingManagement.kt
+++ b/compose/compose-runtime/compose-runtime-benchmark/src/androidTest/java/androidx/compose/benchmark/siblings/SiblingManagement.kt
@@ -21,7 +21,7 @@
import androidx.ui.core.Modifier
import androidx.ui.foundation.Box
import androidx.ui.foundation.Text
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.graphics.Color
import androidx.ui.layout.Column
import androidx.ui.layout.Row
@@ -31,9 +31,9 @@
import androidx.ui.text.TextStyle
import kotlin.random.Random
-val blackBackground = Modifier.drawBackground(Color.Black)
-val blueBackground = Modifier.drawBackground(Color.Blue)
-val magentaBackground = Modifier.drawBackground(Color.Magenta)
+val blackBackground = Modifier.background(color = Color.Black)
+val blueBackground = Modifier.background(color = Color.Blue)
+val magentaBackground = Modifier.background(color = Color.Magenta)
val blackStyle = TextStyle(color = Color.Black)
val blueStyle = TextStyle(color = Color.Blue)
val magentaStyle = TextStyle(color = Color.Magenta)
diff --git a/ui/integration-tests/src/main/java/androidx/ui/integration/test/core/SimpleRadioButton2TestCase.kt b/ui/integration-tests/src/main/java/androidx/ui/integration/test/core/SimpleRadioButton2TestCase.kt
index 1de68c7..4a04b10 100644
--- a/ui/integration-tests/src/main/java/androidx/ui/integration/test/core/SimpleRadioButton2TestCase.kt
+++ b/ui/integration-tests/src/main/java/androidx/ui/integration/test/core/SimpleRadioButton2TestCase.kt
@@ -20,7 +20,7 @@
import androidx.ui.core.Modifier
import androidx.ui.foundation.Border
import androidx.ui.foundation.Box
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.foundation.drawBorder
import androidx.ui.foundation.shape.corner.CircleShape
import androidx.ui.geometry.Offset
@@ -42,7 +42,7 @@
Box(
Modifier.preferredSize(48.dp)
.drawBorder(Border(1.dp, Color.Cyan), CircleShape)
- .drawBackground(
+ .background(
color = Color.Cyan,
shape = (PaddingShape(padding, CircleShape))
)
diff --git a/ui/integration-tests/src/main/java/androidx/ui/integration/test/core/SimpleRadioButton4TestCase.kt b/ui/integration-tests/src/main/java/androidx/ui/integration/test/core/SimpleRadioButton4TestCase.kt
index d6b0a79..a417dbf 100644
--- a/ui/integration-tests/src/main/java/androidx/ui/integration/test/core/SimpleRadioButton4TestCase.kt
+++ b/ui/integration-tests/src/main/java/androidx/ui/integration/test/core/SimpleRadioButton4TestCase.kt
@@ -20,7 +20,7 @@
import androidx.ui.core.Modifier
import androidx.ui.foundation.Border
import androidx.ui.foundation.Box
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.foundation.drawBorder
import androidx.ui.foundation.shape.corner.CircleShape
import androidx.ui.graphics.Color
@@ -35,7 +35,7 @@
val innerSize = getInnerSize()
Box(
Modifier.preferredSize(48.dp)
- .drawBackground(Color.Cyan, CircleShape)
+ .background(color = Color.Cyan)
.padding(innerSize.value)
.drawBorder(
border = Border(color = Color.Cyan, size = 1.dp),
diff --git a/ui/integration-tests/src/main/java/androidx/ui/integration/test/foundation/NestedScrollerTestCase.kt b/ui/integration-tests/src/main/java/androidx/ui/integration/test/foundation/NestedScrollerTestCase.kt
index fe6400c..a196c9e 100644
--- a/ui/integration-tests/src/main/java/androidx/ui/integration/test/foundation/NestedScrollerTestCase.kt
+++ b/ui/integration-tests/src/main/java/androidx/ui/integration/test/foundation/NestedScrollerTestCase.kt
@@ -27,8 +27,8 @@
import androidx.ui.foundation.ScrollableColumn
import androidx.ui.foundation.ScrollableRow
import androidx.ui.foundation.Text
-import androidx.ui.foundation.drawBackground
import androidx.ui.foundation.rememberScrollState
+import androidx.ui.foundation.background
import androidx.ui.graphics.Color
import androidx.ui.integration.test.ToggleableTestCase
import androidx.ui.layout.Column
@@ -83,7 +83,7 @@
val blue = Random.nextInt(256)
Color(red = red, green = green, blue = blue)
}
- Box(Modifier.preferredSize(350f.toDp()).drawBackground(color))
+ Box(Modifier.preferredSize(350f.toDp()).background(color = color))
Text(
text = "Some title",
color = Color.Black,
@@ -99,7 +99,7 @@
Modifier
.gravity(Alignment.CenterVertically)
.preferredSize(40f.toDp())
- .drawBackground(playStoreColor)
+ .background(color = playStoreColor)
)
}
}
diff --git a/ui/integration-tests/src/main/java/androidx/ui/integration/test/foundation/RectsInColumnSharedModelTestCase.kt b/ui/integration-tests/src/main/java/androidx/ui/integration/test/foundation/RectsInColumnSharedModelTestCase.kt
index 7d34bc3..54b8ae4 100644
--- a/ui/integration-tests/src/main/java/androidx/ui/integration/test/foundation/RectsInColumnSharedModelTestCase.kt
+++ b/ui/integration-tests/src/main/java/androidx/ui/integration/test/foundation/RectsInColumnSharedModelTestCase.kt
@@ -20,8 +20,8 @@
import androidx.compose.mutableStateOf
import androidx.ui.core.Modifier
import androidx.ui.foundation.Box
+import androidx.ui.foundation.background
import androidx.ui.unit.dp
-import androidx.ui.foundation.drawBackground
import androidx.ui.graphics.Color
import androidx.ui.layout.Column
import androidx.ui.material.MaterialTheme
@@ -48,9 +48,9 @@
Column {
repeat(amountOfRectangles) { i ->
if (i == 0) {
- Box(Modifier.preferredSize(100.dp, 50.dp).drawBackground(color.value))
+ Box(Modifier.preferredSize(100.dp, 50.dp).background(color = color.value))
} else {
- Box(Modifier.preferredSize(100.dp, 50.dp).drawBackground(Color.Green))
+ Box(Modifier.preferredSize(100.dp, 50.dp).background(color = Color.Green))
}
}
}
diff --git a/ui/integration-tests/src/main/java/androidx/ui/integration/test/foundation/RectsInColumnTestCase.kt b/ui/integration-tests/src/main/java/androidx/ui/integration/test/foundation/RectsInColumnTestCase.kt
index b093e72..16a0fe5 100644
--- a/ui/integration-tests/src/main/java/androidx/ui/integration/test/foundation/RectsInColumnTestCase.kt
+++ b/ui/integration-tests/src/main/java/androidx/ui/integration/test/foundation/RectsInColumnTestCase.kt
@@ -21,7 +21,7 @@
import androidx.compose.state
import androidx.ui.core.Modifier
import androidx.ui.foundation.Box
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.unit.dp
import androidx.ui.graphics.Color
import androidx.ui.layout.Column
@@ -69,6 +69,6 @@
fun ColoredRectWithModel() {
val state = state { Color.Black }
states.add(state)
- Box(Modifier.preferredSize(100.dp, 50.dp).drawBackground(state.value))
+ Box(Modifier.preferredSize(100.dp, 50.dp).background(color = state.value))
}
}
\ No newline at end of file
diff --git a/ui/ui-android-view/integration-tests/android-view-demos/src/main/java/androidx/ui/androidview/demos/PointerInputInteropAndroidInCompose.kt b/ui/ui-android-view/integration-tests/android-view-demos/src/main/java/androidx/ui/androidview/demos/PointerInputInteropAndroidInCompose.kt
index 398107f..530c2c3 100644
--- a/ui/ui-android-view/integration-tests/android-view-demos/src/main/java/androidx/ui/androidview/demos/PointerInputInteropAndroidInCompose.kt
+++ b/ui/ui-android-view/integration-tests/android-view-demos/src/main/java/androidx/ui/androidview/demos/PointerInputInteropAndroidInCompose.kt
@@ -30,8 +30,8 @@
import androidx.ui.foundation.ScrollableColumn
import androidx.ui.foundation.ScrollableRow
import androidx.ui.foundation.Text
-import androidx.ui.foundation.drawBackground
import androidx.ui.geometry.Offset
+import androidx.ui.foundation.background
import androidx.ui.layout.Column
import androidx.ui.layout.fillMaxSize
import androidx.ui.layout.padding
@@ -173,11 +173,13 @@
@Composable
private fun AndroidScrollInComposeScrollDifferentOrientation() {
Column {
- Text("Demonstrates correct \"scroll orientation\" locking when something scrollable in " +
- "Android is nested inside something scrollable in Compose.")
+ Text(
+ "Demonstrates correct \"scroll orientation\" locking when something scrollable in " +
+ "Android is nested inside something scrollable in Compose."
+ )
Text("You should only be able to scroll in one orientation at a time.")
- ScrollableRow(modifier = Modifier.drawBackground(androidx.ui.graphics.Color.Blue)) {
- Box(modifier = Modifier.padding(96.dp).drawBackground(androidx.ui.graphics.Color.Red)) {
+ ScrollableRow(modifier = Modifier.background(androidx.ui.graphics.Color.Blue)) {
+ Box(modifier = Modifier.padding(96.dp).background(androidx.ui.graphics.Color.Red)) {
AndroidView(R.layout.android_scroll_in_compose_scroll_different_orientation)
}
}
@@ -187,8 +189,10 @@
@Composable
private fun AndroidScrollInComposeScrollSameOrientation() {
Column {
- Text("Supposed to demonstrate correct nested scrolling when something scrollable in " +
- "Android is inside something scrollable in Compose.")
+ Text(
+ "Supposed to demonstrate correct nested scrolling when something scrollable in " +
+ "Android is inside something scrollable in Compose."
+ )
Text(
"This doesn't actually work because nested scrolling isn't implemented between " +
"Compose and Android. Normally, this lack of implementation would mean the " +
@@ -197,11 +201,11 @@
"that for Compose, and thus the child scrolls and prevents the parent from " +
"intercepting. "
)
- ScrollableColumn(modifier = Modifier.drawBackground(androidx.ui.graphics.Color.Blue)) {
+ ScrollableColumn(modifier = Modifier.background(androidx.ui.graphics.Color.Blue)) {
Box(
modifier = Modifier
.padding(96.dp)
- .drawBackground(androidx.ui.graphics.Color.Red)
+ .background(color = androidx.ui.graphics.Color.Red)
.preferredHeight(750.dp)
) {
AndroidView(R.layout.android_scroll_in_compose_scroll_same_orientation)
diff --git a/ui/ui-android-view/integration-tests/android-view-demos/src/main/java/androidx/ui/androidview/demos/PointerInputInteropComposeInAndroid.kt b/ui/ui-android-view/integration-tests/android-view-demos/src/main/java/androidx/ui/androidview/demos/PointerInputInteropComposeInAndroid.kt
index 3962a9c..4591f16 100644
--- a/ui/ui-android-view/integration-tests/android-view-demos/src/main/java/androidx/ui/androidview/demos/PointerInputInteropComposeInAndroid.kt
+++ b/ui/ui-android-view/integration-tests/android-view-demos/src/main/java/androidx/ui/androidview/demos/PointerInputInteropComposeInAndroid.kt
@@ -34,8 +34,8 @@
import androidx.ui.foundation.Box
import androidx.ui.foundation.ScrollableColumn
import androidx.ui.foundation.ScrollableRow
+import androidx.ui.foundation.background
import androidx.ui.foundation.clickable
-import androidx.ui.foundation.drawBackground
import androidx.ui.graphics.Color
import androidx.ui.graphics.RectangleShape
import androidx.ui.graphics.toArgb
@@ -108,7 +108,7 @@
container.setBackgroundColor(currentColor.toArgb())
}
composition = container.setContent(Recomposer.current()) {
- Box(Modifier.drawBackground(Color.LightGray, RectangleShape).fillMaxSize())
+ Box(Modifier.background(color = Color.LightGray).fillMaxSize())
}
}
@@ -160,7 +160,7 @@
Column {
Box(
- tap + Modifier.drawBackground(currentColor.value, RectangleShape).fillMaxSize()
+ tap + Modifier.background(color = currentColor.value).fillMaxSize()
)
}
}
@@ -200,7 +200,7 @@
Box(
Modifier
- .drawBackground(Color.Gray, RectangleShape)
+ .background(color = Color.Gray)
.fillMaxWidth()
.preferredHeight(456.dp)
.wrapContentSize()
@@ -208,7 +208,7 @@
currentColor.value =
if (currentColor.value == Color.Blue) Color.Yellow else Color.Blue
}
- .drawBackground(currentColor.value, RectangleShape)
+ .background(currentColor.value, RectangleShape)
.preferredSize(192.dp)
)
}
@@ -246,14 +246,14 @@
ScrollableColumn(
modifier = Modifier
.padding(48.dp)
- .drawBackground(Color.Gray, RectangleShape)
+ .background(color = Color.Gray)
.fillMaxWidth()
.preferredHeight(456.dp)
) {
Box(
Modifier
.padding(48.dp)
- .drawBackground(Color.LightGray, RectangleShape)
+ .background(color = Color.LightGray)
.fillMaxWidth()
.preferredHeight(456.dp)
)
@@ -291,14 +291,14 @@
ScrollableRow(
modifier = Modifier
.padding(48.dp)
- .drawBackground(Color.Gray, RectangleShape)
+ .background(color = Color.Gray)
.fillMaxWidth()
.preferredHeight(456.dp)
) {
Box(
Modifier
.padding(48.dp)
- .drawBackground(Color.LightGray, RectangleShape)
+ .background(color = Color.LightGray)
.preferredWidth(360.dp)
.fillMaxHeight()
)
diff --git a/ui/ui-animation/integration-tests/animation-demos/src/main/java/androidx/ui/animation/demos/StateAnimationWithInterruptionsDemo.kt b/ui/ui-animation/integration-tests/animation-demos/src/main/java/androidx/ui/animation/demos/StateAnimationWithInterruptionsDemo.kt
index e4cfa6e..bcf616d 100644
--- a/ui/ui-animation/integration-tests/animation-demos/src/main/java/androidx/ui/animation/demos/StateAnimationWithInterruptionsDemo.kt
+++ b/ui/ui-animation/integration-tests/animation-demos/src/main/java/androidx/ui/animation/demos/StateAnimationWithInterruptionsDemo.kt
@@ -32,7 +32,7 @@
import androidx.ui.core.Modifier
import androidx.ui.foundation.Box
import androidx.ui.foundation.Canvas
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.geometry.Offset
import androidx.ui.geometry.Size
import androidx.ui.graphics.Color
@@ -96,7 +96,7 @@
private fun ColorRectState(state: TransitionState) {
val color = state[background]
val scaleY = state[y]
- Canvas(Modifier.fillMaxSize().drawBackground(color = color)) {
+ Canvas(Modifier.fillMaxSize().background(color = color)) {
drawRect(
Color(alpha = 255, red = 255, green = 255, blue = 255),
topLeft = Offset(100f, 0f),
diff --git a/ui/ui-animation/samples/src/main/java/androidx/ui/animation/samples/AnimatedValueSamples.kt b/ui/ui-animation/samples/src/main/java/androidx/ui/animation/samples/AnimatedValueSamples.kt
index 65c325a..d84e47f 100644
--- a/ui/ui-animation/samples/src/main/java/androidx/ui/animation/samples/AnimatedValueSamples.kt
+++ b/ui/ui-animation/samples/src/main/java/androidx/ui/animation/samples/AnimatedValueSamples.kt
@@ -27,7 +27,7 @@
import androidx.ui.foundation.Box
import androidx.ui.foundation.ContentGravity
import androidx.ui.foundation.Text
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.graphics.Color
import androidx.ui.layout.fillMaxSize
import androidx.ui.layout.preferredSize
@@ -73,5 +73,5 @@
convertToVector = { AnimationVector2D(it.width.value, it.height.value) },
convertFromVector = { MySize(it.v1.dp, it.v2.dp) }
))
- Box(Modifier.preferredSize(animSize.width, animSize.height).drawBackground(Color.Red))
+ Box(Modifier.preferredSize(animSize.width, animSize.height).background(color = Color.Red))
}
diff --git a/ui/ui-animation/samples/src/main/java/androidx/ui/animation/samples/TransitionSamples.kt b/ui/ui-animation/samples/src/main/java/androidx/ui/animation/samples/TransitionSamples.kt
index 4598173..4086016 100644
--- a/ui/ui-animation/samples/src/main/java/androidx/ui/animation/samples/TransitionSamples.kt
+++ b/ui/ui-animation/samples/src/main/java/androidx/ui/animation/samples/TransitionSamples.kt
@@ -24,7 +24,7 @@
import androidx.ui.animation.transition
import androidx.ui.core.Modifier
import androidx.ui.foundation.Box
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.graphics.Color
import androidx.ui.layout.preferredSize
import androidx.ui.unit.dp
@@ -61,7 +61,7 @@
Box(
Modifier
.preferredSize(state[widthKey], state[heightKey])
- .drawBackground(state[colorKey])
+ .background(color = state[colorKey])
)
}
@@ -74,7 +74,7 @@
Box(
Modifier
.preferredSize(state[widthKey], state[heightKey])
- .drawBackground(state[colorKey])
+ .background(state[colorKey])
)
}
}
diff --git a/ui/ui-core/integration-tests/ui-core-demos/src/main/java/androidx/ui/core/demos/PopupDemo.kt b/ui/ui-core/integration-tests/ui-core-demos/src/main/java/androidx/ui/core/demos/PopupDemo.kt
index e69e07b..f654f90 100644
--- a/ui/ui-core/integration-tests/ui-core-demos/src/main/java/androidx/ui/core/demos/PopupDemo.kt
+++ b/ui/ui-core/integration-tests/ui-core-demos/src/main/java/androidx/ui/core/demos/PopupDemo.kt
@@ -28,8 +28,8 @@
import androidx.ui.foundation.ScrollableColumn
import androidx.ui.foundation.Text
import androidx.ui.foundation.TextField
+import androidx.ui.foundation.background
import androidx.ui.foundation.clickable
-import androidx.ui.foundation.drawBackground
import androidx.ui.foundation.shape.corner.CircleShape
import androidx.ui.graphics.Color
import androidx.ui.input.ImeAction
@@ -218,7 +218,7 @@
backgroundColor = Color.Blue
) {
Popup(Alignment.BottomCenter) {
- Text("Popup", modifier = Modifier.drawBackground(color = Color.Green))
+ Text("Popup", modifier = Modifier.background(color = Color.Green))
}
}
}
@@ -319,7 +319,7 @@
Spacer(Modifier.preferredHeight(10.dp))
Text(
modifier = Modifier.gravity(Alignment.CenterHorizontally)
- .drawBackground(color = Color.White),
+ .background(color = Color.White),
text = "Alignment : " + popupAlignment.value.toString()
)
}
@@ -481,7 +481,7 @@
val state = state { TextFieldValue(initialText) }
TextField(
value = state.value,
- modifier = modifier.drawBackground(color = color),
+ modifier = modifier.background(color = color),
keyboardType = keyboardType,
imeAction = imeAction,
>
diff --git a/ui/ui-core/integration-tests/ui-core-demos/src/main/java/androidx/ui/core/demos/gestures/DoubleTapGestureDetectorDemo.kt b/ui/ui-core/integration-tests/ui-core-demos/src/main/java/androidx/ui/core/demos/gestures/DoubleTapGestureDetectorDemo.kt
index d846a61..b94199b 100644
--- a/ui/ui-core/integration-tests/ui-core-demos/src/main/java/androidx/ui/core/demos/gestures/DoubleTapGestureDetectorDemo.kt
+++ b/ui/ui-core/integration-tests/ui-core-demos/src/main/java/androidx/ui/core/demos/gestures/DoubleTapGestureDetectorDemo.kt
@@ -23,7 +23,7 @@
import androidx.ui.core.gesture.doubleTapGestureFilter
import androidx.ui.foundation.Box
import androidx.ui.foundation.Text
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.foundation.drawBorder
import androidx.ui.layout.Column
import androidx.ui.layout.fillMaxSize
@@ -51,7 +51,7 @@
.preferredSize(192.dp)
.doubleTapGestureFilter(onDoubleTap)
.drawBorder(2.dp, BorderColor)
- .drawBackground(color.value)
+ .background(color = color.value)
)
}
}
diff --git a/ui/ui-core/integration-tests/ui-core-demos/src/main/java/androidx/ui/core/demos/gestures/DoubleTapInTapDemo.kt b/ui/ui-core/integration-tests/ui-core-demos/src/main/java/androidx/ui/core/demos/gestures/DoubleTapInTapDemo.kt
index 44cc47a..112f9ee 100644
--- a/ui/ui-core/integration-tests/ui-core-demos/src/main/java/androidx/ui/core/demos/gestures/DoubleTapInTapDemo.kt
+++ b/ui/ui-core/integration-tests/ui-core-demos/src/main/java/androidx/ui/core/demos/gestures/DoubleTapInTapDemo.kt
@@ -24,7 +24,7 @@
import androidx.ui.core.gesture.tapGestureFilter
import androidx.ui.foundation.Box
import androidx.ui.foundation.Text
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.foundation.drawBorder
import androidx.ui.geometry.Offset
import androidx.ui.graphics.RectangleShape
@@ -69,14 +69,14 @@
.preferredSize(192.dp)
.tapGestureFilter(onTap)
.drawBorder(2.dp, BorderColor)
- .drawBackground(outerColor.value, RectangleShape)
+ .background(color = outerColor.value)
.fillMaxSize()
.wrapContentSize(Alignment.Center)
.preferredSize(96.dp)
.doubleTapGestureFilter(onDoubleTap)
.drawBorder(2.dp, BorderColor)
- .drawBackground(innerColor.value, RectangleShape)
+ .background(color = innerColor.value, shape = RectangleShape)
)
}
}
\ No newline at end of file
diff --git a/ui/ui-core/integration-tests/ui-core-demos/src/main/java/androidx/ui/core/demos/gestures/HorizontalScrollersInVerticalScrollerDemo.kt b/ui/ui-core/integration-tests/ui-core-demos/src/main/java/androidx/ui/core/demos/gestures/HorizontalScrollersInVerticalScrollerDemo.kt
index b789ba0..bd1c6fe 100644
--- a/ui/ui-core/integration-tests/ui-core-demos/src/main/java/androidx/ui/core/demos/gestures/HorizontalScrollersInVerticalScrollerDemo.kt
+++ b/ui/ui-core/integration-tests/ui-core-demos/src/main/java/androidx/ui/core/demos/gestures/HorizontalScrollersInVerticalScrollerDemo.kt
@@ -33,7 +33,7 @@
import androidx.ui.core.gesture.tapGestureFilter
import androidx.ui.foundation.Box
import androidx.ui.foundation.Text
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.foundation.drawBorder
import androidx.ui.geometry.Offset
import androidx.ui.graphics.Color
@@ -214,13 +214,13 @@
.longPressGestureFilter(onLongPress)
val pressOverlay =
- if (showPressed.value) Modifier.drawBackground(pressedColor) else Modifier
+ if (showPressed.value) Modifier.background(color = pressedColor) else Modifier
Box(
gestureDetectors
.preferredSize(width, height)
.drawBorder(1.dp, Color.Black)
- .drawBackground(color.value)
+ .background(color = color.value)
.plus(pressOverlay)
)
}
diff --git a/ui/ui-core/integration-tests/ui-core-demos/src/main/java/androidx/ui/core/demos/gestures/NestedScalingDemo.kt b/ui/ui-core/integration-tests/ui-core-demos/src/main/java/androidx/ui/core/demos/gestures/NestedScalingDemo.kt
index 35fac27d..5d71eed 100644
--- a/ui/ui-core/integration-tests/ui-core-demos/src/main/java/androidx/ui/core/demos/gestures/NestedScalingDemo.kt
+++ b/ui/ui-core/integration-tests/ui-core-demos/src/main/java/androidx/ui/core/demos/gestures/NestedScalingDemo.kt
@@ -24,7 +24,7 @@
import androidx.ui.core.gesture.rawScaleGestureFilter
import androidx.ui.core.gesture.RawScaleObserver
import androidx.ui.foundation.Text
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.graphics.Color
import androidx.ui.layout.Column
import androidx.ui.layout.wrapContentSize
@@ -85,7 +85,7 @@
children = children,
modifier = Modifier.wrapContentSize(Alignment.Center)
.rawScaleGestureFilter(outerScaleObserver)
- .drawBackground(color = color),
+ .background(color = color),
measureBlock = { measurables, constraints ->
val newConstraints =
constraints.copy(
diff --git a/ui/ui-core/integration-tests/ui-core-demos/src/main/java/androidx/ui/core/demos/gestures/NestedScrollingDemo.kt b/ui/ui-core/integration-tests/ui-core-demos/src/main/java/androidx/ui/core/demos/gestures/NestedScrollingDemo.kt
index a20d89a..c2fee80 100644
--- a/ui/ui-core/integration-tests/ui-core-demos/src/main/java/androidx/ui/core/demos/gestures/NestedScrollingDemo.kt
+++ b/ui/ui-core/integration-tests/ui-core-demos/src/main/java/androidx/ui/core/demos/gestures/NestedScrollingDemo.kt
@@ -33,7 +33,7 @@
import androidx.ui.foundation.Border
import androidx.ui.foundation.Box
import androidx.ui.foundation.Text
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.foundation.drawBorder
import androidx.ui.geometry.Offset
import androidx.ui.graphics.Color
@@ -170,8 +170,8 @@
val layout = Modifier.fillMaxWidth().preferredHeight(height)
val pressOverlay =
- if (showPressed.value) Modifier.drawBackground(pressedColor) else Modifier
- Box(gestureDetectors.plus(layout).drawBackground(color.value).plus(pressOverlay))
+ if (showPressed.value) Modifier.background(color = pressedColor) else Modifier
+ Box(gestureDetectors.plus(layout).background(color = color.value).plus(pressOverlay))
}
/**
diff --git a/ui/ui-core/integration-tests/ui-core-demos/src/main/java/androidx/ui/core/demos/gestures/PointerInputDuringSubCompDemo.kt b/ui/ui-core/integration-tests/ui-core-demos/src/main/java/androidx/ui/core/demos/gestures/PointerInputDuringSubCompDemo.kt
index 1c96c08..ff2d7dc 100644
--- a/ui/ui-core/integration-tests/ui-core-demos/src/main/java/androidx/ui/core/demos/gestures/PointerInputDuringSubCompDemo.kt
+++ b/ui/ui-core/integration-tests/ui-core-demos/src/main/java/androidx/ui/core/demos/gestures/PointerInputDuringSubCompDemo.kt
@@ -31,7 +31,7 @@
import androidx.ui.foundation.Box
import androidx.ui.foundation.lazy.LazyColumnItems
import androidx.ui.foundation.Text
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.foundation.drawBorder
import androidx.ui.graphics.Color
import androidx.ui.layout.Column
@@ -66,7 +66,7 @@
.fillMaxSize()
.wrapContentSize(Alignment.Center)
.size(200.dp)
- .drawBackground(Color.White)
+ .background(color = Color.White)
) {
val pointerCount = state { 0 }
diff --git a/ui/ui-core/integration-tests/ui-core-demos/src/main/java/androidx/ui/core/demos/gestures/VerticalScrollerInDrawerLayoutDemo.kt b/ui/ui-core/integration-tests/ui-core-demos/src/main/java/androidx/ui/core/demos/gestures/VerticalScrollerInDrawerLayoutDemo.kt
index 4b67c0c..639f309 100644
--- a/ui/ui-core/integration-tests/ui-core-demos/src/main/java/androidx/ui/core/demos/gestures/VerticalScrollerInDrawerLayoutDemo.kt
+++ b/ui/ui-core/integration-tests/ui-core-demos/src/main/java/androidx/ui/core/demos/gestures/VerticalScrollerInDrawerLayoutDemo.kt
@@ -35,7 +35,7 @@
import androidx.ui.core.gesture.tapGestureFilter
import androidx.ui.foundation.Box
import androidx.ui.foundation.Text
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.foundation.drawBorder
import androidx.ui.geometry.Offset
import androidx.ui.graphics.Color
@@ -116,7 +116,7 @@
.fillMaxHeight()
.width(drawerWidth)
.offsetPx(x = currentOffset)
- .drawBackground(DefaultBackgroundColor)
+ .background(color = DefaultBackgroundColor)
) {
Text(
"This is empty drawer content",
@@ -266,14 +266,14 @@
.longPressGestureFilter(onLongPress)
val pressOverlay =
- if (showPressed.value) Modifier.drawBackground(pressedColor) else Modifier
+ if (showPressed.value) Modifier.background(color = pressedColor) else Modifier
Box(
Modifier
.fillMaxWidth()
.preferredHeight(height)
.drawBorder(1.dp, Color.Black)
- .drawBackground(color.value)
+ .background(color = color.value)
.plus(pressOverlay) + gestureDetectors
)
}
diff --git a/ui/ui-core/integration-tests/ui-core-demos/src/main/java/androidx/ui/core/demos/viewinterop/ViewInterop.kt b/ui/ui-core/integration-tests/ui-core-demos/src/main/java/androidx/ui/core/demos/viewinterop/ViewInterop.kt
index 2c37dfc..c74734b 100644
--- a/ui/ui-core/integration-tests/ui-core-demos/src/main/java/androidx/ui/core/demos/viewinterop/ViewInterop.kt
+++ b/ui/ui-core/integration-tests/ui-core-demos/src/main/java/androidx/ui/core/demos/viewinterop/ViewInterop.kt
@@ -36,7 +36,7 @@
import androidx.ui.core.demos.R
import androidx.ui.foundation.Box
import androidx.ui.foundation.Text
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.graphics.Color
import androidx.ui.graphics.toArgb
import androidx.ui.layout.Column
@@ -67,8 +67,8 @@
// Include an Android ViewGroup and add Compose to it.
emitView(::LinearLayout, { it.orientation = LinearLayout.VERTICAL }) {
- Box(Modifier.size(50.dp).drawBackground(Color.Blue))
- Box(Modifier.size(50.dp).drawBackground(Color.Gray))
+ Box(Modifier.size(50.dp).background(Color.Blue))
+ Box(Modifier.size(50.dp).background(Color.Gray))
}
// Inflate AndroidView from XML.
diff --git a/ui/ui-core/samples/src/main/java/androidx/ui/core/samples/ModifierSamples.kt b/ui/ui-core/samples/src/main/java/androidx/ui/core/samples/ModifierSamples.kt
index e1fde33..243bed9 100644
--- a/ui/ui-core/samples/src/main/java/androidx/ui/core/samples/ModifierSamples.kt
+++ b/ui/ui-core/samples/src/main/java/androidx/ui/core/samples/ModifierSamples.kt
@@ -22,7 +22,7 @@
import androidx.compose.Composable
import androidx.ui.core.Modifier
import androidx.ui.foundation.Text
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.graphics.Color
import androidx.ui.layout.Column
import androidx.ui.layout.Row
@@ -36,7 +36,7 @@
Text(
"Hello, World!",
Modifier.padding(16.dp) // Outer padding; outside background
- .drawBackground(Color.Green) // Solid element background color
+ .background(color = Color.Green) // Solid element background color
.padding(16.dp) // Inner padding; inside background, around text
)
}
diff --git a/ui/ui-core/samples/src/main/java/androidx/ui/core/samples/PainterSample.kt b/ui/ui-core/samples/src/main/java/androidx/ui/core/samples/PainterSample.kt
index 9a90c96..5495327 100644
--- a/ui/ui-core/samples/src/main/java/androidx/ui/core/samples/PainterSample.kt
+++ b/ui/ui-core/samples/src/main/java/androidx/ui/core/samples/PainterSample.kt
@@ -21,7 +21,7 @@
import androidx.ui.core.Modifier
import androidx.ui.core.paint
import androidx.ui.foundation.Box
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.geometry.Size
import androidx.ui.graphics.Color
import androidx.ui.graphics.painter.Painter
@@ -48,9 +48,9 @@
Box(
modifier =
- Modifier.drawBackground(Color.Gray)
+ Modifier.background(color = Color.Gray)
.padding(30.dp)
- .drawBackground(Color.Yellow)
+ .background(color = Color.Yellow)
.paint(CustomPainter())
) { /** intentionally empty **/ }
}
\ No newline at end of file
diff --git a/ui/ui-core/src/androidAndroidTest/kotlin/androidx/ui/core/PainterModifierTest.kt b/ui/ui-core/src/androidAndroidTest/kotlin/androidx/ui/core/PainterModifierTest.kt
index 48d63d2..2f5369b 100644
--- a/ui/ui-core/src/androidAndroidTest/kotlin/androidx/ui/core/PainterModifierTest.kt
+++ b/ui/ui-core/src/androidAndroidTest/kotlin/androidx/ui/core/PainterModifierTest.kt
@@ -28,7 +28,7 @@
import androidx.ui.core.test.assertColorsEqual
import androidx.ui.core.test.background
import androidx.ui.foundation.Box
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.geometry.Size
import androidx.ui.graphics.BlendMode
import androidx.ui.graphics.Canvas
@@ -473,7 +473,7 @@
Box(
modifier = Modifier
.testTag(testTag)
- .drawBackground(Color.Gray)
+ .background(color = Color.Gray)
.width((boxWidth / DensityAmbient.current.density).dp)
.height((boxHeight / DensityAmbient.current.density).dp)
.paint(ImagePainter(srcImage), contentScale = ContentScale.FillHeight)
@@ -512,7 +512,7 @@
val vectorWidthDp = (vectorWidth / DensityAmbient.current.density).dp
val vectorHeightDp = (vectorHeight / DensityAmbient.current.density).dp
Box(
- modifier = Modifier.drawBackground(Color.Gray)
+ modifier = Modifier.background(color = Color.Gray)
.width((boxWidth / DensityAmbient.current.density).dp)
.height((boxHeight / DensityAmbient.current.density).dp)
.paint(
diff --git a/ui/ui-core/src/androidAndroidTest/kotlin/androidx/ui/core/focus/FindFocusableChildrenTest.kt b/ui/ui-core/src/androidAndroidTest/kotlin/androidx/ui/core/focus/FindFocusableChildrenTest.kt
index a5e4861..7dc7b22 100644
--- a/ui/ui-core/src/androidAndroidTest/kotlin/androidx/ui/core/focus/FindFocusableChildrenTest.kt
+++ b/ui/ui-core/src/androidAndroidTest/kotlin/androidx/ui/core/focus/FindFocusableChildrenTest.kt
@@ -19,7 +19,7 @@
import androidx.test.filters.SmallTest
import androidx.ui.core.Modifier
import androidx.ui.foundation.Box
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.graphics.Color.Companion.Red
import androidx.ui.test.createComposeRule
import androidx.ui.test.runOnIdle
@@ -71,7 +71,7 @@
composeTestRule.setContent {
focusModifier1 = FocusModifier()
focusModifier2 = FocusModifier()
- Box(modifier = focusModifier1 + Modifier.drawBackground(Red) + focusModifier2)
+ Box(modifier = focusModifier1 + Modifier.background(color = Red) + focusModifier2)
}
// Act.
diff --git a/ui/ui-core/src/androidAndroidTest/kotlin/androidx/ui/core/focus/FindParentFocusNodeTest.kt b/ui/ui-core/src/androidAndroidTest/kotlin/androidx/ui/core/focus/FindParentFocusNodeTest.kt
index 53725ca..0ef8e71 100644
--- a/ui/ui-core/src/androidAndroidTest/kotlin/androidx/ui/core/focus/FindParentFocusNodeTest.kt
+++ b/ui/ui-core/src/androidAndroidTest/kotlin/androidx/ui/core/focus/FindParentFocusNodeTest.kt
@@ -19,7 +19,7 @@
import androidx.test.filters.SmallTest
import androidx.ui.core.Modifier
import androidx.ui.foundation.Box
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.graphics.Color.Companion.Red
import androidx.ui.test.createComposeRule
import androidx.ui.test.runOnIdle
@@ -97,7 +97,7 @@
modifier1 = FocusModifier()
modifier2 = FocusModifier()
modifier3 = FocusModifier()
- Box(modifier = modifier1 + modifier2 + Modifier.drawBackground(Red) + modifier3)
+ Box(modifier = modifier1 + modifier2 + Modifier.background(color = Red) + modifier3)
}
// Act.
diff --git a/ui/ui-core/src/androidAndroidTest/kotlin/androidx/ui/core/keyinput/FindParentKeyInputNodeTest.kt b/ui/ui-core/src/androidAndroidTest/kotlin/androidx/ui/core/keyinput/FindParentKeyInputNodeTest.kt
index 6c85b55..4678984 100644
--- a/ui/ui-core/src/androidAndroidTest/kotlin/androidx/ui/core/keyinput/FindParentKeyInputNodeTest.kt
+++ b/ui/ui-core/src/androidAndroidTest/kotlin/androidx/ui/core/keyinput/FindParentKeyInputNodeTest.kt
@@ -19,7 +19,7 @@
import androidx.test.filters.SmallTest
import androidx.ui.core.Modifier
import androidx.ui.foundation.Box
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.graphics.Color
import androidx.ui.test.createComposeRule
import androidx.ui.test.runOnIdle
@@ -75,7 +75,10 @@
modifier1 = KeyInputModifier(null, null)
modifier2 = KeyInputModifier(null, null)
modifier3 = KeyInputModifier(null, null)
- Box(modifier = modifier1 + modifier2 + Modifier.drawBackground(Color.Red) + modifier3)
+ Box(
+ modifier = modifier1 + modifier2 + Modifier
+ .background(color = Color.Red) + modifier3
+ )
}
// Act.
diff --git a/ui/ui-core/src/androidAndroidTest/kotlin/androidx/ui/viewinterop/ComposedViewTest.kt b/ui/ui-core/src/androidAndroidTest/kotlin/androidx/ui/viewinterop/ComposedViewTest.kt
index 89b4d41..aca048f 100644
--- a/ui/ui-core/src/androidAndroidTest/kotlin/androidx/ui/viewinterop/ComposedViewTest.kt
+++ b/ui/ui-core/src/androidAndroidTest/kotlin/androidx/ui/viewinterop/ComposedViewTest.kt
@@ -39,7 +39,7 @@
import androidx.ui.core.test.R
import androidx.ui.core.testTag
import androidx.ui.foundation.Box
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.graphics.Color
import androidx.ui.layout.size
import androidx.ui.test.android.AndroidComposeTestRule
@@ -186,7 +186,7 @@
}
}
composeTestRule.setContent {
- AndroidView(frameLayout, Modifier.testTag("view").drawBackground(Color.Blue))
+ AndroidView(frameLayout, Modifier.testTag("view").background(color = Color.Blue))
}
onNodeWithTag("view").captureToBitmap().assertPixels(IntSize(size, size)) {
diff --git a/ui/ui-desktop/samples/src/jvmMain/kotlin/androidx/ui/desktop/examples/example1/Main.kt b/ui/ui-desktop/samples/src/jvmMain/kotlin/androidx/ui/desktop/examples/example1/Main.kt
index de1ee4c..d3ef486 100644
--- a/ui/ui-desktop/samples/src/jvmMain/kotlin/androidx/ui/desktop/examples/example1/Main.kt
+++ b/ui/ui-desktop/samples/src/jvmMain/kotlin/androidx/ui/desktop/examples/example1/Main.kt
@@ -25,7 +25,6 @@
import androidx.ui.desktop.AppWindow
import androidx.ui.foundation.Image
import androidx.ui.foundation.Text
-import androidx.ui.foundation.drawBackground
import androidx.ui.graphics.Color
import androidx.ui.graphics.ImageAsset
import androidx.ui.graphics.asImageAsset
@@ -78,7 +77,7 @@
text = "Привет! ä½ å¥½! Desktop Compose ${amount.value}",
color = Color.Black,
modifier = Modifier
- .drawBackground(Color.Blue)
+ .background(Color.Blue)
.preferredHeight(56.dp)
.wrapContentSize(Alignment.Center)
)
diff --git a/ui/ui-desktop/src/jvmTest/kotlin/androidx/ui/desktop/ParagraphTest.kt b/ui/ui-desktop/src/jvmTest/kotlin/androidx/ui/desktop/ParagraphTest.kt
index 89731e3..094bdda 100644
--- a/ui/ui-desktop/src/jvmTest/kotlin/androidx/ui/desktop/ParagraphTest.kt
+++ b/ui/ui-desktop/src/jvmTest/kotlin/androidx/ui/desktop/ParagraphTest.kt
@@ -21,7 +21,6 @@
import androidx.ui.desktop.test.DesktopScreenshotTestRule
import androidx.ui.desktop.test.TestSkiaWindow
import androidx.ui.foundation.Text
-import androidx.ui.foundation.drawBackground
import androidx.ui.graphics.Color
import androidx.ui.layout.Arrangement
import androidx.ui.layout.Column
@@ -82,7 +81,7 @@
text = "Привет! ä½ å¥½! Desktop Compose",
color = Color.Black,
modifier = Modifier
- .drawBackground(Color.Blue)
+ .background(Color.Blue)
.preferredHeight(56.dp)
.wrapContentSize(Alignment.Center)
)
diff --git a/ui/ui-foundation/api/0.1.0-dev16.txt b/ui/ui-foundation/api/0.1.0-dev16.txt
index f9d9a4f..25f985b 100644
--- a/ui/ui-foundation/api/0.1.0-dev16.txt
+++ b/ui/ui-foundation/api/0.1.0-dev16.txt
@@ -5,6 +5,13 @@
method @androidx.compose.Composable public static void Dialog(kotlin.jvm.functions.Function0<kotlin.Unit> onCloseRequest, kotlin.jvm.functions.Function0<kotlin.Unit> children);
}
+ public final class BackgroundKt {
+ method public static androidx.ui.core.Modifier background(androidx.ui.core.Modifier, androidx.ui.graphics.Brush brush, androidx.ui.graphics.Shape shape = androidx.ui.graphics.RectangleShapeKt.RectangleShape, @FloatRange(from=0.0, to=1.0) float alpha = 1.0f);
+ method public static androidx.ui.core.Modifier background-IZZjS-Q(androidx.ui.core.Modifier, long color, androidx.ui.graphics.Shape shape = androidx.ui.graphics.RectangleShapeKt.RectangleShape);
+ method @Deprecated public static androidx.ui.core.Modifier drawBackground(androidx.ui.core.Modifier, androidx.ui.graphics.Brush brush, androidx.ui.graphics.Shape shape = androidx.ui.graphics.RectangleShapeKt.RectangleShape, @FloatRange(from=0.0, to=1.0) float alpha = 1.0f, androidx.ui.graphics.drawscope.DrawStyle style = Fill, androidx.ui.graphics.ColorFilter? colorFilter = null, androidx.ui.graphics.BlendMode blendMode = DrawScope.DefaultBlendMode);
+ method @Deprecated public static androidx.ui.core.Modifier drawBackground-a_xWPtA(androidx.ui.core.Modifier, long color, androidx.ui.graphics.Shape shape = androidx.ui.graphics.RectangleShapeKt.RectangleShape, @FloatRange(from=0.0, to=1.0) float alpha = 1.0f, androidx.ui.graphics.drawscope.DrawStyle style = Fill, androidx.ui.graphics.ColorFilter? colorFilter = null, androidx.ui.graphics.BlendMode blendMode = DrawScope.DefaultBlendMode);
+ }
+
@androidx.compose.Immutable public final class Border {
method public float component1();
method public androidx.ui.graphics.Brush component2();
@@ -51,11 +58,6 @@
method @androidx.compose.Stable public static androidx.ui.core.Modifier determinateProgressIndicator(androidx.ui.core.Modifier, @FloatRange(from=0.0, to=1.0) float progress);
}
- public final class DrawBackgroundKt {
- method public static androidx.ui.core.Modifier drawBackground(androidx.ui.core.Modifier, androidx.ui.graphics.Brush brush, androidx.ui.graphics.Shape shape = androidx.ui.graphics.RectangleShapeKt.RectangleShape, @FloatRange(from=0.0, to=1.0) float alpha = 1.0f, androidx.ui.graphics.drawscope.DrawStyle style = Fill, androidx.ui.graphics.ColorFilter? colorFilter = null, androidx.ui.graphics.BlendMode blendMode = DrawScope.DefaultBlendMode);
- method public static androidx.ui.core.Modifier drawBackground-a_xWPtA(androidx.ui.core.Modifier, long color, androidx.ui.graphics.Shape shape = androidx.ui.graphics.RectangleShapeKt.RectangleShape, @FloatRange(from=0.0, to=1.0) float alpha = 1.0f, androidx.ui.graphics.drawscope.DrawStyle style = Fill, androidx.ui.graphics.ColorFilter? colorFilter = null, androidx.ui.graphics.BlendMode blendMode = DrawScope.DefaultBlendMode);
- }
-
public final class DrawBorder implements androidx.ui.core.DrawModifier {
method public void draw(androidx.ui.core.ContentDrawScope);
}
diff --git a/ui/ui-foundation/api/current.txt b/ui/ui-foundation/api/current.txt
index f9d9a4f..25f985b 100644
--- a/ui/ui-foundation/api/current.txt
+++ b/ui/ui-foundation/api/current.txt
@@ -5,6 +5,13 @@
method @androidx.compose.Composable public static void Dialog(kotlin.jvm.functions.Function0<kotlin.Unit> onCloseRequest, kotlin.jvm.functions.Function0<kotlin.Unit> children);
}
+ public final class BackgroundKt {
+ method public static androidx.ui.core.Modifier background(androidx.ui.core.Modifier, androidx.ui.graphics.Brush brush, androidx.ui.graphics.Shape shape = androidx.ui.graphics.RectangleShapeKt.RectangleShape, @FloatRange(from=0.0, to=1.0) float alpha = 1.0f);
+ method public static androidx.ui.core.Modifier background-IZZjS-Q(androidx.ui.core.Modifier, long color, androidx.ui.graphics.Shape shape = androidx.ui.graphics.RectangleShapeKt.RectangleShape);
+ method @Deprecated public static androidx.ui.core.Modifier drawBackground(androidx.ui.core.Modifier, androidx.ui.graphics.Brush brush, androidx.ui.graphics.Shape shape = androidx.ui.graphics.RectangleShapeKt.RectangleShape, @FloatRange(from=0.0, to=1.0) float alpha = 1.0f, androidx.ui.graphics.drawscope.DrawStyle style = Fill, androidx.ui.graphics.ColorFilter? colorFilter = null, androidx.ui.graphics.BlendMode blendMode = DrawScope.DefaultBlendMode);
+ method @Deprecated public static androidx.ui.core.Modifier drawBackground-a_xWPtA(androidx.ui.core.Modifier, long color, androidx.ui.graphics.Shape shape = androidx.ui.graphics.RectangleShapeKt.RectangleShape, @FloatRange(from=0.0, to=1.0) float alpha = 1.0f, androidx.ui.graphics.drawscope.DrawStyle style = Fill, androidx.ui.graphics.ColorFilter? colorFilter = null, androidx.ui.graphics.BlendMode blendMode = DrawScope.DefaultBlendMode);
+ }
+
@androidx.compose.Immutable public final class Border {
method public float component1();
method public androidx.ui.graphics.Brush component2();
@@ -51,11 +58,6 @@
method @androidx.compose.Stable public static androidx.ui.core.Modifier determinateProgressIndicator(androidx.ui.core.Modifier, @FloatRange(from=0.0, to=1.0) float progress);
}
- public final class DrawBackgroundKt {
- method public static androidx.ui.core.Modifier drawBackground(androidx.ui.core.Modifier, androidx.ui.graphics.Brush brush, androidx.ui.graphics.Shape shape = androidx.ui.graphics.RectangleShapeKt.RectangleShape, @FloatRange(from=0.0, to=1.0) float alpha = 1.0f, androidx.ui.graphics.drawscope.DrawStyle style = Fill, androidx.ui.graphics.ColorFilter? colorFilter = null, androidx.ui.graphics.BlendMode blendMode = DrawScope.DefaultBlendMode);
- method public static androidx.ui.core.Modifier drawBackground-a_xWPtA(androidx.ui.core.Modifier, long color, androidx.ui.graphics.Shape shape = androidx.ui.graphics.RectangleShapeKt.RectangleShape, @FloatRange(from=0.0, to=1.0) float alpha = 1.0f, androidx.ui.graphics.drawscope.DrawStyle style = Fill, androidx.ui.graphics.ColorFilter? colorFilter = null, androidx.ui.graphics.BlendMode blendMode = DrawScope.DefaultBlendMode);
- }
-
public final class DrawBorder implements androidx.ui.core.DrawModifier {
method public void draw(androidx.ui.core.ContentDrawScope);
}
diff --git a/ui/ui-foundation/api/public_plus_experimental_0.1.0-dev16.txt b/ui/ui-foundation/api/public_plus_experimental_0.1.0-dev16.txt
index f9d9a4f..25f985b 100644
--- a/ui/ui-foundation/api/public_plus_experimental_0.1.0-dev16.txt
+++ b/ui/ui-foundation/api/public_plus_experimental_0.1.0-dev16.txt
@@ -5,6 +5,13 @@
method @androidx.compose.Composable public static void Dialog(kotlin.jvm.functions.Function0<kotlin.Unit> onCloseRequest, kotlin.jvm.functions.Function0<kotlin.Unit> children);
}
+ public final class BackgroundKt {
+ method public static androidx.ui.core.Modifier background(androidx.ui.core.Modifier, androidx.ui.graphics.Brush brush, androidx.ui.graphics.Shape shape = androidx.ui.graphics.RectangleShapeKt.RectangleShape, @FloatRange(from=0.0, to=1.0) float alpha = 1.0f);
+ method public static androidx.ui.core.Modifier background-IZZjS-Q(androidx.ui.core.Modifier, long color, androidx.ui.graphics.Shape shape = androidx.ui.graphics.RectangleShapeKt.RectangleShape);
+ method @Deprecated public static androidx.ui.core.Modifier drawBackground(androidx.ui.core.Modifier, androidx.ui.graphics.Brush brush, androidx.ui.graphics.Shape shape = androidx.ui.graphics.RectangleShapeKt.RectangleShape, @FloatRange(from=0.0, to=1.0) float alpha = 1.0f, androidx.ui.graphics.drawscope.DrawStyle style = Fill, androidx.ui.graphics.ColorFilter? colorFilter = null, androidx.ui.graphics.BlendMode blendMode = DrawScope.DefaultBlendMode);
+ method @Deprecated public static androidx.ui.core.Modifier drawBackground-a_xWPtA(androidx.ui.core.Modifier, long color, androidx.ui.graphics.Shape shape = androidx.ui.graphics.RectangleShapeKt.RectangleShape, @FloatRange(from=0.0, to=1.0) float alpha = 1.0f, androidx.ui.graphics.drawscope.DrawStyle style = Fill, androidx.ui.graphics.ColorFilter? colorFilter = null, androidx.ui.graphics.BlendMode blendMode = DrawScope.DefaultBlendMode);
+ }
+
@androidx.compose.Immutable public final class Border {
method public float component1();
method public androidx.ui.graphics.Brush component2();
@@ -51,11 +58,6 @@
method @androidx.compose.Stable public static androidx.ui.core.Modifier determinateProgressIndicator(androidx.ui.core.Modifier, @FloatRange(from=0.0, to=1.0) float progress);
}
- public final class DrawBackgroundKt {
- method public static androidx.ui.core.Modifier drawBackground(androidx.ui.core.Modifier, androidx.ui.graphics.Brush brush, androidx.ui.graphics.Shape shape = androidx.ui.graphics.RectangleShapeKt.RectangleShape, @FloatRange(from=0.0, to=1.0) float alpha = 1.0f, androidx.ui.graphics.drawscope.DrawStyle style = Fill, androidx.ui.graphics.ColorFilter? colorFilter = null, androidx.ui.graphics.BlendMode blendMode = DrawScope.DefaultBlendMode);
- method public static androidx.ui.core.Modifier drawBackground-a_xWPtA(androidx.ui.core.Modifier, long color, androidx.ui.graphics.Shape shape = androidx.ui.graphics.RectangleShapeKt.RectangleShape, @FloatRange(from=0.0, to=1.0) float alpha = 1.0f, androidx.ui.graphics.drawscope.DrawStyle style = Fill, androidx.ui.graphics.ColorFilter? colorFilter = null, androidx.ui.graphics.BlendMode blendMode = DrawScope.DefaultBlendMode);
- }
-
public final class DrawBorder implements androidx.ui.core.DrawModifier {
method public void draw(androidx.ui.core.ContentDrawScope);
}
diff --git a/ui/ui-foundation/api/public_plus_experimental_current.txt b/ui/ui-foundation/api/public_plus_experimental_current.txt
index f9d9a4f..25f985b 100644
--- a/ui/ui-foundation/api/public_plus_experimental_current.txt
+++ b/ui/ui-foundation/api/public_plus_experimental_current.txt
@@ -5,6 +5,13 @@
method @androidx.compose.Composable public static void Dialog(kotlin.jvm.functions.Function0<kotlin.Unit> onCloseRequest, kotlin.jvm.functions.Function0<kotlin.Unit> children);
}
+ public final class BackgroundKt {
+ method public static androidx.ui.core.Modifier background(androidx.ui.core.Modifier, androidx.ui.graphics.Brush brush, androidx.ui.graphics.Shape shape = androidx.ui.graphics.RectangleShapeKt.RectangleShape, @FloatRange(from=0.0, to=1.0) float alpha = 1.0f);
+ method public static androidx.ui.core.Modifier background-IZZjS-Q(androidx.ui.core.Modifier, long color, androidx.ui.graphics.Shape shape = androidx.ui.graphics.RectangleShapeKt.RectangleShape);
+ method @Deprecated public static androidx.ui.core.Modifier drawBackground(androidx.ui.core.Modifier, androidx.ui.graphics.Brush brush, androidx.ui.graphics.Shape shape = androidx.ui.graphics.RectangleShapeKt.RectangleShape, @FloatRange(from=0.0, to=1.0) float alpha = 1.0f, androidx.ui.graphics.drawscope.DrawStyle style = Fill, androidx.ui.graphics.ColorFilter? colorFilter = null, androidx.ui.graphics.BlendMode blendMode = DrawScope.DefaultBlendMode);
+ method @Deprecated public static androidx.ui.core.Modifier drawBackground-a_xWPtA(androidx.ui.core.Modifier, long color, androidx.ui.graphics.Shape shape = androidx.ui.graphics.RectangleShapeKt.RectangleShape, @FloatRange(from=0.0, to=1.0) float alpha = 1.0f, androidx.ui.graphics.drawscope.DrawStyle style = Fill, androidx.ui.graphics.ColorFilter? colorFilter = null, androidx.ui.graphics.BlendMode blendMode = DrawScope.DefaultBlendMode);
+ }
+
@androidx.compose.Immutable public final class Border {
method public float component1();
method public androidx.ui.graphics.Brush component2();
@@ -51,11 +58,6 @@
method @androidx.compose.Stable public static androidx.ui.core.Modifier determinateProgressIndicator(androidx.ui.core.Modifier, @FloatRange(from=0.0, to=1.0) float progress);
}
- public final class DrawBackgroundKt {
- method public static androidx.ui.core.Modifier drawBackground(androidx.ui.core.Modifier, androidx.ui.graphics.Brush brush, androidx.ui.graphics.Shape shape = androidx.ui.graphics.RectangleShapeKt.RectangleShape, @FloatRange(from=0.0, to=1.0) float alpha = 1.0f, androidx.ui.graphics.drawscope.DrawStyle style = Fill, androidx.ui.graphics.ColorFilter? colorFilter = null, androidx.ui.graphics.BlendMode blendMode = DrawScope.DefaultBlendMode);
- method public static androidx.ui.core.Modifier drawBackground-a_xWPtA(androidx.ui.core.Modifier, long color, androidx.ui.graphics.Shape shape = androidx.ui.graphics.RectangleShapeKt.RectangleShape, @FloatRange(from=0.0, to=1.0) float alpha = 1.0f, androidx.ui.graphics.drawscope.DrawStyle style = Fill, androidx.ui.graphics.ColorFilter? colorFilter = null, androidx.ui.graphics.BlendMode blendMode = DrawScope.DefaultBlendMode);
- }
-
public final class DrawBorder implements androidx.ui.core.DrawModifier {
method public void draw(androidx.ui.core.ContentDrawScope);
}
diff --git a/ui/ui-foundation/api/restricted_0.1.0-dev16.txt b/ui/ui-foundation/api/restricted_0.1.0-dev16.txt
index f9d9a4f..25f985b 100644
--- a/ui/ui-foundation/api/restricted_0.1.0-dev16.txt
+++ b/ui/ui-foundation/api/restricted_0.1.0-dev16.txt
@@ -5,6 +5,13 @@
method @androidx.compose.Composable public static void Dialog(kotlin.jvm.functions.Function0<kotlin.Unit> onCloseRequest, kotlin.jvm.functions.Function0<kotlin.Unit> children);
}
+ public final class BackgroundKt {
+ method public static androidx.ui.core.Modifier background(androidx.ui.core.Modifier, androidx.ui.graphics.Brush brush, androidx.ui.graphics.Shape shape = androidx.ui.graphics.RectangleShapeKt.RectangleShape, @FloatRange(from=0.0, to=1.0) float alpha = 1.0f);
+ method public static androidx.ui.core.Modifier background-IZZjS-Q(androidx.ui.core.Modifier, long color, androidx.ui.graphics.Shape shape = androidx.ui.graphics.RectangleShapeKt.RectangleShape);
+ method @Deprecated public static androidx.ui.core.Modifier drawBackground(androidx.ui.core.Modifier, androidx.ui.graphics.Brush brush, androidx.ui.graphics.Shape shape = androidx.ui.graphics.RectangleShapeKt.RectangleShape, @FloatRange(from=0.0, to=1.0) float alpha = 1.0f, androidx.ui.graphics.drawscope.DrawStyle style = Fill, androidx.ui.graphics.ColorFilter? colorFilter = null, androidx.ui.graphics.BlendMode blendMode = DrawScope.DefaultBlendMode);
+ method @Deprecated public static androidx.ui.core.Modifier drawBackground-a_xWPtA(androidx.ui.core.Modifier, long color, androidx.ui.graphics.Shape shape = androidx.ui.graphics.RectangleShapeKt.RectangleShape, @FloatRange(from=0.0, to=1.0) float alpha = 1.0f, androidx.ui.graphics.drawscope.DrawStyle style = Fill, androidx.ui.graphics.ColorFilter? colorFilter = null, androidx.ui.graphics.BlendMode blendMode = DrawScope.DefaultBlendMode);
+ }
+
@androidx.compose.Immutable public final class Border {
method public float component1();
method public androidx.ui.graphics.Brush component2();
@@ -51,11 +58,6 @@
method @androidx.compose.Stable public static androidx.ui.core.Modifier determinateProgressIndicator(androidx.ui.core.Modifier, @FloatRange(from=0.0, to=1.0) float progress);
}
- public final class DrawBackgroundKt {
- method public static androidx.ui.core.Modifier drawBackground(androidx.ui.core.Modifier, androidx.ui.graphics.Brush brush, androidx.ui.graphics.Shape shape = androidx.ui.graphics.RectangleShapeKt.RectangleShape, @FloatRange(from=0.0, to=1.0) float alpha = 1.0f, androidx.ui.graphics.drawscope.DrawStyle style = Fill, androidx.ui.graphics.ColorFilter? colorFilter = null, androidx.ui.graphics.BlendMode blendMode = DrawScope.DefaultBlendMode);
- method public static androidx.ui.core.Modifier drawBackground-a_xWPtA(androidx.ui.core.Modifier, long color, androidx.ui.graphics.Shape shape = androidx.ui.graphics.RectangleShapeKt.RectangleShape, @FloatRange(from=0.0, to=1.0) float alpha = 1.0f, androidx.ui.graphics.drawscope.DrawStyle style = Fill, androidx.ui.graphics.ColorFilter? colorFilter = null, androidx.ui.graphics.BlendMode blendMode = DrawScope.DefaultBlendMode);
- }
-
public final class DrawBorder implements androidx.ui.core.DrawModifier {
method public void draw(androidx.ui.core.ContentDrawScope);
}
diff --git a/ui/ui-foundation/api/restricted_current.txt b/ui/ui-foundation/api/restricted_current.txt
index f9d9a4f..25f985b 100644
--- a/ui/ui-foundation/api/restricted_current.txt
+++ b/ui/ui-foundation/api/restricted_current.txt
@@ -5,6 +5,13 @@
method @androidx.compose.Composable public static void Dialog(kotlin.jvm.functions.Function0<kotlin.Unit> onCloseRequest, kotlin.jvm.functions.Function0<kotlin.Unit> children);
}
+ public final class BackgroundKt {
+ method public static androidx.ui.core.Modifier background(androidx.ui.core.Modifier, androidx.ui.graphics.Brush brush, androidx.ui.graphics.Shape shape = androidx.ui.graphics.RectangleShapeKt.RectangleShape, @FloatRange(from=0.0, to=1.0) float alpha = 1.0f);
+ method public static androidx.ui.core.Modifier background-IZZjS-Q(androidx.ui.core.Modifier, long color, androidx.ui.graphics.Shape shape = androidx.ui.graphics.RectangleShapeKt.RectangleShape);
+ method @Deprecated public static androidx.ui.core.Modifier drawBackground(androidx.ui.core.Modifier, androidx.ui.graphics.Brush brush, androidx.ui.graphics.Shape shape = androidx.ui.graphics.RectangleShapeKt.RectangleShape, @FloatRange(from=0.0, to=1.0) float alpha = 1.0f, androidx.ui.graphics.drawscope.DrawStyle style = Fill, androidx.ui.graphics.ColorFilter? colorFilter = null, androidx.ui.graphics.BlendMode blendMode = DrawScope.DefaultBlendMode);
+ method @Deprecated public static androidx.ui.core.Modifier drawBackground-a_xWPtA(androidx.ui.core.Modifier, long color, androidx.ui.graphics.Shape shape = androidx.ui.graphics.RectangleShapeKt.RectangleShape, @FloatRange(from=0.0, to=1.0) float alpha = 1.0f, androidx.ui.graphics.drawscope.DrawStyle style = Fill, androidx.ui.graphics.ColorFilter? colorFilter = null, androidx.ui.graphics.BlendMode blendMode = DrawScope.DefaultBlendMode);
+ }
+
@androidx.compose.Immutable public final class Border {
method public float component1();
method public androidx.ui.graphics.Brush component2();
@@ -51,11 +58,6 @@
method @androidx.compose.Stable public static androidx.ui.core.Modifier determinateProgressIndicator(androidx.ui.core.Modifier, @FloatRange(from=0.0, to=1.0) float progress);
}
- public final class DrawBackgroundKt {
- method public static androidx.ui.core.Modifier drawBackground(androidx.ui.core.Modifier, androidx.ui.graphics.Brush brush, androidx.ui.graphics.Shape shape = androidx.ui.graphics.RectangleShapeKt.RectangleShape, @FloatRange(from=0.0, to=1.0) float alpha = 1.0f, androidx.ui.graphics.drawscope.DrawStyle style = Fill, androidx.ui.graphics.ColorFilter? colorFilter = null, androidx.ui.graphics.BlendMode blendMode = DrawScope.DefaultBlendMode);
- method public static androidx.ui.core.Modifier drawBackground-a_xWPtA(androidx.ui.core.Modifier, long color, androidx.ui.graphics.Shape shape = androidx.ui.graphics.RectangleShapeKt.RectangleShape, @FloatRange(from=0.0, to=1.0) float alpha = 1.0f, androidx.ui.graphics.drawscope.DrawStyle style = Fill, androidx.ui.graphics.ColorFilter? colorFilter = null, androidx.ui.graphics.BlendMode blendMode = DrawScope.DefaultBlendMode);
- }
-
public final class DrawBorder implements androidx.ui.core.DrawModifier {
method public void draw(androidx.ui.core.ContentDrawScope);
}
diff --git a/ui/ui-foundation/samples/src/main/java/androidx/ui/foundation/samples/DarkThemeSample.kt b/ui/ui-foundation/samples/src/main/java/androidx/ui/foundation/samples/DarkThemeSample.kt
index 3f69910..cfffe2e 100644
--- a/ui/ui-foundation/samples/src/main/java/androidx/ui/foundation/samples/DarkThemeSample.kt
+++ b/ui/ui-foundation/samples/src/main/java/androidx/ui/foundation/samples/DarkThemeSample.kt
@@ -20,7 +20,7 @@
import androidx.compose.Composable
import androidx.ui.core.Modifier
import androidx.ui.foundation.Box
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.foundation.isSystemInDarkTheme
import androidx.ui.graphics.Color
import androidx.ui.layout.Stack
@@ -33,6 +33,6 @@
val dark = isSystemInDarkTheme()
val color = if (dark) Color.White else Color.Black
Stack {
- Box(Modifier.preferredSize(50.dp).drawBackground(color))
+ Box(Modifier.preferredSize(50.dp).background(color = color))
}
}
diff --git a/ui/ui-foundation/samples/src/main/java/androidx/ui/foundation/samples/DeterminateProgressSamples.kt b/ui/ui-foundation/samples/src/main/java/androidx/ui/foundation/samples/DeterminateProgressSamples.kt
index 2cb96e7..72c22d0 100644
--- a/ui/ui-foundation/samples/src/main/java/androidx/ui/foundation/samples/DeterminateProgressSamples.kt
+++ b/ui/ui-foundation/samples/src/main/java/androidx/ui/foundation/samples/DeterminateProgressSamples.kt
@@ -20,8 +20,8 @@
import androidx.compose.Composable
import androidx.ui.core.Modifier
import androidx.ui.foundation.Box
+import androidx.ui.foundation.background
import androidx.ui.foundation.determinateProgressIndicator
-import androidx.ui.foundation.drawBackground
import androidx.ui.graphics.Color
import androidx.ui.layout.preferredSize
import androidx.ui.unit.dp
@@ -30,6 +30,8 @@
@Composable
fun DeterminateProgressSample() {
val progress = 0.5f // emulate progress from some state
- Box(Modifier.determinateProgressIndicator(progress)
- .preferredSize((progress * 100).dp, 4.dp).drawBackground(Color.Cyan))
+ Box(
+ Modifier.determinateProgressIndicator(progress)
+ .preferredSize((progress * 100).dp, 4.dp).background(color = Color.Cyan)
+ )
}
\ No newline at end of file
diff --git a/ui/ui-foundation/samples/src/main/java/androidx/ui/foundation/samples/DrawBackgroundSamples.kt b/ui/ui-foundation/samples/src/main/java/androidx/ui/foundation/samples/DrawBackgroundSamples.kt
index 064d5f5..f5c927d 100644
--- a/ui/ui-foundation/samples/src/main/java/androidx/ui/foundation/samples/DrawBackgroundSamples.kt
+++ b/ui/ui-foundation/samples/src/main/java/androidx/ui/foundation/samples/DrawBackgroundSamples.kt
@@ -20,11 +20,10 @@
import androidx.compose.Composable
import androidx.ui.core.Modifier
import androidx.ui.foundation.Text
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.foundation.shape.corner.CutCornerShape
import androidx.ui.graphics.Color
import androidx.ui.graphics.HorizontalGradient
-import androidx.ui.graphics.RectangleShape
import androidx.ui.layout.padding
import androidx.ui.unit.dp
@@ -33,7 +32,7 @@
fun DrawBackgroundColor() {
Text(
"Text with background",
- Modifier.drawBackground(Color.Magenta, RectangleShape).padding(10.dp)
+ Modifier.background(color = Color.Magenta).padding(10.dp)
)
}
@@ -47,7 +46,7 @@
)
Text(
"Text with gradient back",
- Modifier.drawBackground(brush = gradientBrush, shape = CutCornerShape(8.dp))
+ Modifier.background(brush = gradientBrush, shape = CutCornerShape(8.dp))
.padding(10.dp)
)
}
\ No newline at end of file
diff --git a/ui/ui-foundation/samples/src/main/java/androidx/ui/foundation/samples/ScrollerSamples.kt b/ui/ui-foundation/samples/src/main/java/androidx/ui/foundation/samples/ScrollerSamples.kt
index c27e0ee..0161914 100644
--- a/ui/ui-foundation/samples/src/main/java/androidx/ui/foundation/samples/ScrollerSamples.kt
+++ b/ui/ui-foundation/samples/src/main/java/androidx/ui/foundation/samples/ScrollerSamples.kt
@@ -25,8 +25,8 @@
import androidx.ui.foundation.ScrollableColumn
import androidx.ui.foundation.ScrollableRow
import androidx.ui.foundation.Text
+import androidx.ui.foundation.background
import androidx.ui.foundation.clickable
-import androidx.ui.foundation.drawBackground
import androidx.ui.foundation.horizontalScroll
import androidx.ui.foundation.rememberScrollState
import androidx.ui.foundation.verticalScroll
@@ -96,7 +96,7 @@
Modifier
.horizontalScroll(scrollState)
.size(width = 10000.dp, height = 200.dp)
- .drawBackground(gradient)
+ .background(brush = gradient)
)
}
@@ -112,7 +112,7 @@
.verticalScroll(scrollState)
.fillMaxWidth()
.height(10000.dp)
- .drawBackground(gradient)
+ .background(brush = gradient)
)
}
@@ -186,7 +186,7 @@
Modifier.padding(5.dp)
.preferredSize(120.dp, 60.dp)
.clickable(>
- .drawBackground(Color.LightGray),
+ .background(color = Color.LightGray),
gravity = ContentGravity.Center,
children = text
)
diff --git a/ui/ui-foundation/samples/src/main/java/androidx/ui/foundation/samples/SelectableSamples.kt b/ui/ui-foundation/samples/src/main/java/androidx/ui/foundation/samples/SelectableSamples.kt
index 4193d7c..1b661eb 100644
--- a/ui/ui-foundation/samples/src/main/java/androidx/ui/foundation/samples/SelectableSamples.kt
+++ b/ui/ui-foundation/samples/src/main/java/androidx/ui/foundation/samples/SelectableSamples.kt
@@ -24,7 +24,7 @@
import androidx.ui.core.Modifier
import androidx.ui.foundation.Box
import androidx.ui.foundation.Text
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.foundation.selection.selectable
import androidx.ui.graphics.Color
import androidx.ui.layout.Column
@@ -46,7 +46,7 @@
Box(
Modifier
.size(100.dp)
- .drawBackground(color)
+ .background(color = color)
.selectable(
selected = selected,
selectedOption = color }
diff --git a/ui/ui-foundation/src/androidAndroidTest/kotlin/androidx/ui/foundation/DrawBackgroundTest.kt b/ui/ui-foundation/src/androidAndroidTest/kotlin/androidx/ui/foundation/BackgroundTest.kt
similarity index 88%
rename from ui/ui-foundation/src/androidAndroidTest/kotlin/androidx/ui/foundation/DrawBackgroundTest.kt
rename to ui/ui-foundation/src/androidAndroidTest/kotlin/androidx/ui/foundation/BackgroundTest.kt
index bee152a..78eb384 100644
--- a/ui/ui-foundation/src/androidAndroidTest/kotlin/androidx/ui/foundation/DrawBackgroundTest.kt
+++ b/ui/ui-foundation/src/androidAndroidTest/kotlin/androidx/ui/foundation/BackgroundTest.kt
@@ -42,7 +42,7 @@
@MediumTest
@SdkSuppress(minSdkVersion = Build.VERSION_CODES.O)
@RunWith(JUnit4::class)
-class DrawBackgroundTest {
+class BackgroundTest {
@get:Rule
val composeTestRule = createComposeRule()
@@ -54,10 +54,10 @@
composeTestRule.setContent {
SemanticParent {
Box(
- Modifier.preferredSize(40f.toDp()).drawBackground(Color.Magenta),
+ Modifier.preferredSize(40f.toDp()).background(Color.Magenta),
gravity = ContentGravity.Center
) {
- Box(Modifier.preferredSize(20f.toDp()).drawBackground(Color.White))
+ Box(Modifier.preferredSize(20f.toDp()).background(Color.White))
}
}
}
@@ -77,12 +77,12 @@
composeTestRule.setContent {
SemanticParent {
Box(
- Modifier.preferredSize(40f.toDp()).drawBackground(Color.Magenta),
+ Modifier.preferredSize(40f.toDp()).background(Color.Magenta),
gravity = ContentGravity.Center
) {
Box(
Modifier.preferredSize(20f.toDp())
- .drawBackground(SolidColor(Color.White))
+ .background(SolidColor(Color.White))
)
}
}
@@ -104,8 +104,8 @@
SemanticParent {
Box(
Modifier.preferredSize(40f.toDp())
- .drawBackground(Color.Magenta)
- .drawBackground(color = Color.White, shape = CircleShape)
+ .background(Color.Magenta)
+ .background(color = Color.White, shape = CircleShape)
)
}
}
@@ -125,8 +125,8 @@
SemanticParent {
Box(
Modifier.preferredSize(40f.toDp())
- .drawBackground(Color.Magenta)
- .drawBackground(
+ .background(Color.Magenta)
+ .background(
brush = SolidColor(Color.White),
shape = CircleShape
)
diff --git a/ui/ui-foundation/src/androidAndroidTest/kotlin/androidx/ui/foundation/BorderTest.kt b/ui/ui-foundation/src/androidAndroidTest/kotlin/androidx/ui/foundation/BorderTest.kt
index 8c84233..68b2001 100644
--- a/ui/ui-foundation/src/androidAndroidTest/kotlin/androidx/ui/foundation/BorderTest.kt
+++ b/ui/ui-foundation/src/androidAndroidTest/kotlin/androidx/ui/foundation/BorderTest.kt
@@ -65,7 +65,7 @@
SemanticParent {
Stack(
Modifier.preferredSize(40.0f.toDp(), 40.0f.toDp())
- .drawBackground(Color.Blue, shape)
+ .background(color = Color.Blue)
.drawBorder(Border(10.0f.toDp(), Color.Red), shape)
) {}
@@ -90,7 +90,7 @@
SemanticParent {
Stack(
Modifier.preferredSize(40.0f.toDp(), 40.0f.toDp())
- .drawBackground(Color.Blue, shape)
+ .background(color = Color.Blue)
.drawBorder(
Border(10.0f.toDp(), SolidColor(Color.Red)),
shape
@@ -117,7 +117,7 @@
SemanticParent {
Stack(
Modifier.preferredSize(40.0f.toDp(), 40.0f.toDp())
- .drawBackground(Color.Blue, shape)
+ .background(color = Color.Blue)
.drawBorder(Border(1500.0f.toDp(), Color.Red), shape)
) {}
}
@@ -139,7 +139,7 @@
SemanticParent {
Stack(
Modifier.preferredSize(40.0f.toDp(), 40.0f.toDp())
- .drawBackground(Color.Blue, shape)
+ .background(color = Color.Blue)
.drawBorder(Border(-5.0f.toDp(), Color.Red), shape)
) {}
}
diff --git a/ui/ui-foundation/src/androidAndroidTest/kotlin/androidx/ui/foundation/CanvasTest.kt b/ui/ui-foundation/src/androidAndroidTest/kotlin/androidx/ui/foundation/CanvasTest.kt
index 2e8143b..8c0bef50 100644
--- a/ui/ui-foundation/src/androidAndroidTest/kotlin/androidx/ui/foundation/CanvasTest.kt
+++ b/ui/ui-foundation/src/androidAndroidTest/kotlin/androidx/ui/foundation/CanvasTest.kt
@@ -64,7 +64,7 @@
val minWidth = (boxWidth / density).dp
val minHeight = (boxHeight / density).dp
Box(modifier = Modifier.preferredSize(containerSize)
- .drawBackground(Color.White)
+ .background(color = Color.White)
.wrapContentSize(Alignment.Center)) {
Canvas(modifier = Modifier.preferredSize(minWidth, minHeight)) {
drawLine(
diff --git a/ui/ui-foundation/src/androidAndroidTest/kotlin/androidx/ui/foundation/DeterminateProgressTest.kt b/ui/ui-foundation/src/androidAndroidTest/kotlin/androidx/ui/foundation/DeterminateProgressTest.kt
index e052952..2696d1a 100644
--- a/ui/ui-foundation/src/androidAndroidTest/kotlin/androidx/ui/foundation/DeterminateProgressTest.kt
+++ b/ui/ui-foundation/src/androidAndroidTest/kotlin/androidx/ui/foundation/DeterminateProgressTest.kt
@@ -48,11 +48,13 @@
composeTestRule
.setContent {
- Box(Modifier
- .testTag(tag)
- .determinateProgressIndicator(progress.value)
- .preferredSize(50.dp)
- .drawBackground(Color.Cyan))
+ Box(
+ Modifier
+ .testTag(tag)
+ .determinateProgressIndicator(progress.value)
+ .preferredSize(50.dp)
+ .background(color = Color.Cyan)
+ )
}
onNodeWithTag(tag)
diff --git a/ui/ui-foundation/src/androidAndroidTest/kotlin/androidx/ui/foundation/ImageTest.kt b/ui/ui-foundation/src/androidAndroidTest/kotlin/androidx/ui/foundation/ImageTest.kt
index 11d3fba..8f2f4f5 100644
--- a/ui/ui-foundation/src/androidAndroidTest/kotlin/androidx/ui/foundation/ImageTest.kt
+++ b/ui/ui-foundation/src/androidAndroidTest/kotlin/androidx/ui/foundation/ImageTest.kt
@@ -102,7 +102,7 @@
val size = (containerSize / DensityAmbient.current.density).dp
Box(
Modifier.preferredSize(size)
- .drawBackground(Color.White)
+ .background(color = Color.White)
.wrapContentSize(Alignment.Center)
) {
Image(modifier = Modifier.testTag(contentTag), asset = createImageAsset())
@@ -133,7 +133,7 @@
val size = (containerSize / DensityAmbient.current.density).dp
Box(
Modifier.preferredSize(size)
- .drawBackground(Color.White)
+ .background(color = Color.White)
.wrapContentSize(Alignment.Center)
) {
Image(
@@ -203,7 +203,7 @@
val size = (containerSize * 2 / density).dp
Box(
Modifier.preferredSize(size)
- .drawBackground(Color.White)
+ .background(color = Color.White)
.wrapContentSize(Alignment.Center)
) {
// The resultant Image composable should be twice the size of the underlying
@@ -245,7 +245,7 @@
val size = (containerSize * 2 / density).dp
Box(
Modifier.preferredSize(size)
- .drawBackground(Color.White)
+ .background(color = Color.White)
.wrapContentSize(Alignment.Center)
) {
// The resultant Image composable should be twice the size of the underlying
@@ -295,7 +295,7 @@
val minHeight = (boxHeight / density).dp
Box(
Modifier.preferredSize(size)
- .drawBackground(Color.White)
+ .background(color = Color.White)
.wrapContentSize(Alignment.Center)
) {
// This is an async call to parse the VectorDrawable xml asset into
diff --git a/ui/ui-foundation/src/androidAndroidTest/kotlin/androidx/ui/foundation/TextFieldCursorTest.kt b/ui/ui-foundation/src/androidAndroidTest/kotlin/androidx/ui/foundation/TextFieldCursorTest.kt
index bc22fd3..32f3433 100644
--- a/ui/ui-foundation/src/androidAndroidTest/kotlin/androidx/ui/foundation/TextFieldCursorTest.kt
+++ b/ui/ui-foundation/src/androidAndroidTest/kotlin/androidx/ui/foundation/TextFieldCursorTest.kt
@@ -64,7 +64,7 @@
value = TextFieldValue(),
>
textStyle = TextStyle(color = Color.White, background = Color.White),
- modifier = Modifier.preferredSize(width, height).drawBackground(Color.White),
+ modifier = Modifier.preferredSize(width, height).background(color = Color.White),
cursorColor = Color.Red,
focused ->
if (focused) latch.countDown()
@@ -99,7 +99,9 @@
value = TextFieldValue(),
>
textStyle = TextStyle(color = Color.White, background = Color.White),
- modifier = Modifier.preferredSize(width, height).drawBackground(Color.White),
+ modifier = Modifier
+ .preferredSize(width, height)
+ .background(color = Color.White),
cursorColor = Color.Red,
focused ->
if (focused) latch.countDown()
diff --git a/ui/ui-foundation/src/androidAndroidTest/kotlin/androidx/ui/foundation/TextFieldTest.kt b/ui/ui-foundation/src/androidAndroidTest/kotlin/androidx/ui/foundation/TextFieldTest.kt
index 25902ab..4bfad76 100644
--- a/ui/ui-foundation/src/androidAndroidTest/kotlin/androidx/ui/foundation/TextFieldTest.kt
+++ b/ui/ui-foundation/src/androidAndroidTest/kotlin/androidx/ui/foundation/TextFieldTest.kt
@@ -421,7 +421,7 @@
value = androidx.ui.input.TextFieldValue(),
>
textColor = Color.White,
- modifier = Modifier.preferredSize(10.dp, 20.dp).drawBackground(Color.White),
+ modifier = Modifier.preferredSize(10.dp, 20.dp).background(color = Color.White),
cursorColor = Color.Blue
)
}
diff --git a/ui/ui-foundation/src/commonMain/kotlin/androidx/ui/foundation/DrawBackground.kt b/ui/ui-foundation/src/commonMain/kotlin/androidx/ui/foundation/Background.kt
similarity index 66%
rename from ui/ui-foundation/src/commonMain/kotlin/androidx/ui/foundation/DrawBackground.kt
rename to ui/ui-foundation/src/commonMain/kotlin/androidx/ui/foundation/Background.kt
index 917eabb..5c3a64b 100644
--- a/ui/ui-foundation/src/commonMain/kotlin/androidx/ui/foundation/DrawBackground.kt
+++ b/ui/ui-foundation/src/commonMain/kotlin/androidx/ui/foundation/Background.kt
@@ -41,6 +41,57 @@
* @param color color to paint background with
* @param shape desired shape of the background
*/
+fun Modifier.background(
+ color: Color,
+ shape: Shape = RectangleShape
+) = this + Background(
+ shape,
+ {
+ drawRect(color)
+ },
+ { outline ->
+ drawOutline(outline, color)
+ }
+)
+
+/**
+ * Draws [shape] with [brush] behind the content.
+ *
+ * @sample androidx.ui.foundation.samples.DrawBackgroundShapedBrush
+ *
+ * @param brush brush to paint background with
+ * @param shape desired shape of the background
+ * @param alpha Opacity to be applied to the [brush]
+ */
+fun Modifier.background(
+ brush: Brush,
+ shape: Shape = RectangleShape,
+ @FloatRange(from = 0.0, to = 1.0) alpha: Float = 1.0f
+) = this + Background(
+ shape,
+ {
+ drawRect(brush = brush, alpha = alpha)
+ },
+ { outline ->
+ drawOutline(outline, brush, alpha = alpha)
+ }
+)
+
+/**
+ * Draws [shape] with a solid [color] behind the content.
+ *
+ * @sample androidx.ui.foundation.samples.DrawBackgroundColor
+ *
+ * @param color color to paint background with
+ * @param shape desired shape of the background
+ */
+@Deprecated(
+ "Use Modifier.background instead", replaceWith = ReplaceWith(
+ "this.background(color = color, shape = shape)",
+ "androidx.ui.foundation.background"
+ )
+)
+@Suppress("UNUSED_PARAMETER")
fun Modifier.drawBackground(
color: Color,
shape: Shape = RectangleShape,
@@ -48,28 +99,7 @@
style: DrawStyle = Fill,
colorFilter: ColorFilter? = null,
blendMode: BlendMode = DrawScope.DefaultBlendMode
-) = this + DrawBackground(
- shape,
- {
- drawRect(
- color,
- alpha = alpha,
- style = style,
- colorFilter = colorFilter,
- blendMode = blendMode
- )
- },
- { outline ->
- drawOutline(
- outline,
- color,
- alpha = alpha,
- style = style,
- colorFilter = colorFilter,
- blendMode = blendMode
- )
- }
- )
+) = background(color, shape)
/**
* Draws [shape] with [brush] behind the content.
@@ -79,6 +109,13 @@
* @param brush brush to paint background with
* @param shape desired shape of the background
*/
+@Deprecated(
+ "Use Modifier.background instead", replaceWith = ReplaceWith(
+ "this.background(brush = brush, shape = shape)",
+ "androidx.ui.foundation.background"
+ )
+)
+@Suppress("UNUSED_PARAMETER")
fun Modifier.drawBackground(
brush: Brush,
shape: Shape = RectangleShape,
@@ -86,28 +123,9 @@
style: DrawStyle = Fill,
colorFilter: ColorFilter? = null,
blendMode: BlendMode = DrawScope.DefaultBlendMode
-) = this + DrawBackground(
- shape,
- { drawRect(
- brush = brush,
- alpha = alpha,
- style = style,
- colorFilter = colorFilter,
- blendMode = blendMode
- )
- },
- { outline ->
- drawOutline(outline,
- brush,
- alpha = alpha,
- style = style,
- colorFilter = colorFilter,
- blendMode = blendMode
- )
- }
- )
+) = background(brush, shape, alpha)
-private data class DrawBackground internal constructor(
+private data class Background internal constructor(
private val shape: Shape,
private val drawRect: ContentDrawScope.() -> Unit,
private val drawOutline: ContentDrawScope.(outline: Outline) -> Unit
diff --git a/ui/ui-foundation/src/commonMain/kotlin/androidx/ui/foundation/Box.kt b/ui/ui-foundation/src/commonMain/kotlin/androidx/ui/foundation/Box.kt
index 34fd28c6..3cbce85 100644
--- a/ui/ui-foundation/src/commonMain/kotlin/androidx/ui/foundation/Box.kt
+++ b/ui/ui-foundation/src/commonMain/kotlin/androidx/ui/foundation/Box.kt
@@ -82,7 +82,7 @@
if (border != null) Modifier.drawBorder(border, shape) else Modifier
val backgroundModifier =
if (backgroundColor != Color.Transparent) {
- Modifier.drawBackground(backgroundColor, shape)
+ Modifier.background(color = backgroundColor, shape = shape)
} else {
Modifier
}
diff --git a/ui/ui-layout/integration-tests/layout-demos/src/main/java/androidx/ui/layout/demos/ComplexLayoutDemo.kt b/ui/ui-layout/integration-tests/layout-demos/src/main/java/androidx/ui/layout/demos/ComplexLayoutDemo.kt
index af31be1..3243fe7 100644
--- a/ui/ui-layout/integration-tests/layout-demos/src/main/java/androidx/ui/layout/demos/ComplexLayoutDemo.kt
+++ b/ui/ui-layout/integration-tests/layout-demos/src/main/java/androidx/ui/layout/demos/ComplexLayoutDemo.kt
@@ -18,7 +18,7 @@
import androidx.compose.Composable
import androidx.ui.core.Modifier
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.graphics.Color
import androidx.ui.layout.Stack
import androidx.ui.layout.fillMaxSize
@@ -30,24 +30,25 @@
@Composable
fun ComplexLayoutDemo() {
- Stack(Modifier.rtl
- .drawBackground(Color.Magenta)
+ Stack(
+ Modifier.rtl
+ .background(color = Color.Magenta)
.padding(start = 10.dp)
.ltr
.padding(start = 10.dp)
.preferredSize(150.dp)
.rtl
- .drawBackground(Color.Gray)
+ .background(Color.Gray)
.padding(start = 10.dp)
.ltr
.padding(start = 10.dp)
- .drawBackground(Color.Blue)
+ .background(Color.Blue)
.rtl
) {
Stack(Modifier
.padding(start = 10.dp)
.ltr
.padding(start = 10.dp)
- .fillMaxSize().drawBackground(Color.Green)) {}
+ .fillMaxSize().background(Color.Green)) {}
}
}
diff --git a/ui/ui-layout/integration-tests/layout-demos/src/main/java/androidx/ui/layout/demos/RtlDemo.kt b/ui/ui-layout/integration-tests/layout-demos/src/main/java/androidx/ui/layout/demos/RtlDemo.kt
index 0ab2542..7c026fc 100644
--- a/ui/ui-layout/integration-tests/layout-demos/src/main/java/androidx/ui/layout/demos/RtlDemo.kt
+++ b/ui/ui-layout/integration-tests/layout-demos/src/main/java/androidx/ui/layout/demos/RtlDemo.kt
@@ -23,7 +23,7 @@
import androidx.ui.core.Modifier
import androidx.ui.core.WithConstraints
import androidx.ui.foundation.Text
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.graphics.Color
import androidx.ui.layout.Arrangement
import androidx.ui.layout.Column
@@ -69,28 +69,28 @@
@Composable
private fun testRow() {
Row {
- Stack(boxSize.drawBackground(Color.Red)) {}
- Stack(boxSize.drawBackground(Color.Green)) {}
+ Stack(boxSize.background(color = Color.Red)) {}
+ Stack(boxSize.background(color = Color.Green)) {}
Row {
- Stack(boxSize.drawBackground(Color.Magenta)) {}
- Stack(boxSize.drawBackground(Color.Yellow)) {}
- Stack(boxSize.drawBackground(Color.Cyan)) {}
+ Stack(boxSize.background(color = Color.Magenta)) {}
+ Stack(boxSize.background(color = Color.Yellow)) {}
+ Stack(boxSize.background(color = Color.Cyan)) {}
}
- Stack(boxSize.drawBackground(Color.Blue)) {}
+ Stack(boxSize.background(color = Color.Blue)) {}
}
}
@Composable
private fun testRow_modifier() {
Row {
- Stack(boxSize.drawBackground(Color.Red)) {}
- Stack(boxSize.drawBackground(Color.Green)) {}
+ Stack(boxSize.background(color = Color.Red)) {}
+ Stack(boxSize.background(color = Color.Green)) {}
Row(Modifier.ltr) {
- Stack(boxSize.drawBackground(Color.Magenta)) {}
- Stack(boxSize.drawBackground(Color.Yellow)) {}
- Stack(boxSize.drawBackground(Color.Cyan)) {}
+ Stack(boxSize.background(color = Color.Magenta)) {}
+ Stack(boxSize.background(color = Color.Yellow)) {}
+ Stack(boxSize.background(color = Color.Cyan)) {}
}
- Stack(boxSize.drawBackground(Color.Blue)) {}
+ Stack(boxSize.background(color = Color.Blue)) {}
}
}
@@ -98,9 +98,9 @@
private fun testText() {
Column {
Row {
- Stack(size.drawBackground(Color.Red)) {}
- Stack(size.drawBackground(Color.Green)) {}
- Stack(size.drawBackground(Color.Blue)) {}
+ Stack(size.background(color = Color.Red)) {}
+ Stack(size.background(color = Color.Green)) {}
+ Stack(size.background(color = Color.Blue)) {}
}
Text("Text.")
Text("Width filled text.", Modifier.fillMaxWidth())
@@ -114,11 +114,11 @@
@Composable
private fun testSiblings() {
Column {
- Stack(boxSize.drawBackground(Color.Red).alignWithSiblings { p -> p.width }
+ Stack(boxSize.background(color = Color.Red).alignWithSiblings { p -> p.width }
) {}
- Stack(boxSize.drawBackground(Color.Green).alignWithSiblings { p -> p.width / 2 }
+ Stack(boxSize.background(color = Color.Green).alignWithSiblings { p -> p.width / 2 }
) {}
- Stack(boxSize.drawBackground(Color.Blue).alignWithSiblings { p -> p.width / 4 }
+ Stack(boxSize.background(color = Color.Blue).alignWithSiblings { p -> p.width / 4 }
) {}
}
}
@@ -126,9 +126,9 @@
@Composable
private fun CustomLayout(rtlSupport: Boolean) {
Layout(children = @Composable {
- Stack(boxSize.drawBackground(Color.Red)) {}
- Stack(boxSize.drawBackground(Color.Green)) {}
- Stack(boxSize.drawBackground(Color.Blue)) {}
+ Stack(boxSize.background(color = Color.Red)) {}
+ Stack(boxSize.background(color = Color.Green)) {}
+ Stack(boxSize.background(color = Color.Blue)) {}
}) { measurables, constraints ->
val p = measurables.map { e ->
e.measure(constraints.copy(minWidth = 0, minHeight = 0))
@@ -156,7 +156,7 @@
val w = maxWidth / 3
val h = maxHeight / 2
val color = if (layoutDirection == LayoutDirection.Ltr) Color.Red else Color.Magenta
- Stack(Modifier.preferredSize(w, h).drawBackground(color)) {
+ Stack(Modifier.preferredSize(w, h).background(color = color)) {
Text(text, Modifier.gravity(Alignment.Center))
}
}
diff --git a/ui/ui-layout/integration-tests/layout-demos/src/main/java/androidx/ui/layout/demos/SimpleLayoutDemo.kt b/ui/ui-layout/integration-tests/layout-demos/src/main/java/androidx/ui/layout/demos/SimpleLayoutDemo.kt
index acbcdf4..5242bb9 100644
--- a/ui/ui-layout/integration-tests/layout-demos/src/main/java/androidx/ui/layout/demos/SimpleLayoutDemo.kt
+++ b/ui/ui-layout/integration-tests/layout-demos/src/main/java/androidx/ui/layout/demos/SimpleLayoutDemo.kt
@@ -21,7 +21,7 @@
import androidx.ui.core.Modifier
import androidx.ui.foundation.Box
import androidx.ui.foundation.Text
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.graphics.Color
import androidx.ui.layout.Arrangement
import androidx.ui.layout.Column
@@ -42,35 +42,35 @@
Column {
Text(text = "Row", fontSize = 48.sp)
- Stack(Modifier.preferredWidth(ExampleSize).drawBackground(color = lightGrey)) {
+ Stack(Modifier.preferredWidth(ExampleSize).background(color = lightGrey)) {
Row(Modifier.fillMaxWidth()) {
PurpleSquare()
CyanSquare()
}
}
Spacer(Modifier.preferredHeight(24.dp))
- Stack(Modifier.preferredWidth(ExampleSize).drawBackground(color = lightGrey)) {
+ Stack(Modifier.preferredWidth(ExampleSize).background(color = lightGrey)) {
Row(Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.Center) {
PurpleSquare()
CyanSquare()
}
}
Spacer(Modifier.preferredHeight(24.dp))
- Stack(Modifier.preferredWidth(ExampleSize).drawBackground(color = lightGrey)) {
+ Stack(Modifier.preferredWidth(ExampleSize).background(color = lightGrey)) {
Row(Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.End) {
PurpleSquare()
CyanSquare()
}
}
Spacer(Modifier.preferredHeight(24.dp))
- Stack(Modifier.preferredWidth(ExampleSize).drawBackground(color = lightGrey)) {
+ Stack(Modifier.preferredWidth(ExampleSize).background(color = lightGrey)) {
Row(Modifier.fillMaxWidth()) {
PurpleSquare()
CyanSquare()
}
}
Spacer(Modifier.preferredHeight(24.dp))
- Stack(Modifier.preferredWidth(ExampleSize).drawBackground(color = lightGrey)) {
+ Stack(Modifier.preferredWidth(ExampleSize).background(color = lightGrey)) {
Row(Modifier.fillMaxWidth()) {
PurpleSquare(Modifier.gravity(Alignment.Bottom))
CyanSquare(Modifier.gravity(Alignment.Bottom))
@@ -79,35 +79,35 @@
Spacer(Modifier.preferredHeight(24.dp))
Text(text = "Column", fontSize = 48.sp)
Row(Modifier.fillMaxWidth()) {
- Stack(Modifier.preferredHeight(ExampleSize).drawBackground(color = lightGrey)) {
+ Stack(Modifier.preferredHeight(ExampleSize).background(color = lightGrey)) {
Column(Modifier.fillMaxHeight()) {
PurpleSquare()
CyanSquare()
}
}
Spacer(Modifier.preferredWidth(24.dp))
- Stack(Modifier.preferredHeight(ExampleSize).drawBackground(color = lightGrey)) {
+ Stack(Modifier.preferredHeight(ExampleSize).background(color = lightGrey)) {
Column(Modifier.fillMaxHeight(), verticalArrangement = Arrangement.Center) {
PurpleSquare()
CyanSquare()
}
}
Spacer(Modifier.preferredWidth(24.dp))
- Stack(Modifier.preferredHeight(ExampleSize).drawBackground(color = lightGrey)) {
+ Stack(Modifier.preferredHeight(ExampleSize).background(color = lightGrey)) {
Column(Modifier.fillMaxHeight(), verticalArrangement = Arrangement.Bottom) {
PurpleSquare()
CyanSquare()
}
}
Spacer(Modifier.preferredWidth(24.dp))
- Stack(Modifier.preferredHeight(ExampleSize).drawBackground(color = lightGrey)) {
+ Stack(Modifier.preferredHeight(ExampleSize).background(color = lightGrey)) {
Column(Modifier.fillMaxHeight()) {
PurpleSquare()
CyanSquare()
}
}
Spacer(Modifier.preferredWidth(24.dp))
- Stack(Modifier.preferredHeight(ExampleSize).drawBackground(color = lightGrey)) {
+ Stack(Modifier.preferredHeight(ExampleSize).background(color = lightGrey)) {
Column(Modifier.fillMaxHeight()) {
PurpleSquare(Modifier.gravity(Alignment.End))
CyanSquare(Modifier.gravity(Alignment.End))
diff --git a/ui/ui-layout/samples/src/main/java/androidx/ui/layout/samples/ColumnSample.kt b/ui/ui-layout/samples/src/main/java/androidx/ui/layout/samples/ColumnSample.kt
index 25b32be..00eb974 100644
--- a/ui/ui-layout/samples/src/main/java/androidx/ui/layout/samples/ColumnSample.kt
+++ b/ui/ui-layout/samples/src/main/java/androidx/ui/layout/samples/ColumnSample.kt
@@ -23,7 +23,7 @@
import androidx.ui.core.Modifier
import androidx.ui.core.VerticalAlignmentLine
import androidx.ui.foundation.Box
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.graphics.Color
import androidx.ui.layout.Column
import androidx.ui.layout.fillMaxWidth
@@ -122,7 +122,7 @@
fun RectangleWithStartEnd(modifier: Modifier = Modifier, color: Color, width: Dp, height: Dp) {
Layout(
children = { },
- modifier = modifier.drawBackground(color = color)
+ modifier = modifier.background(color = color)
) { _, constraints ->
val widthPx = max(width.toIntPx(), constraints.minWidth)
val heightPx = max(height.toIntPx(), constraints.minHeight)
diff --git a/ui/ui-layout/samples/src/main/java/androidx/ui/layout/samples/LayoutPaddingSample.kt b/ui/ui-layout/samples/src/main/java/androidx/ui/layout/samples/LayoutPaddingSample.kt
index d7b1955..8190577 100644
--- a/ui/ui-layout/samples/src/main/java/androidx/ui/layout/samples/LayoutPaddingSample.kt
+++ b/ui/ui-layout/samples/src/main/java/androidx/ui/layout/samples/LayoutPaddingSample.kt
@@ -20,7 +20,7 @@
import androidx.compose.Composable
import androidx.ui.core.Modifier
import androidx.ui.foundation.Box
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.graphics.Color
import androidx.ui.layout.InnerPadding
import androidx.ui.layout.Stack
@@ -32,7 +32,7 @@
@Sampled
@Composable
fun PaddingModifier() {
- Stack(Modifier.drawBackground(Color.Gray)) {
+ Stack(Modifier.background(color = Color.Gray)) {
Box(
Modifier.padding(start = 20.dp, top = 30.dp, end = 20.dp, bottom = 30.dp)
.preferredSize(50.dp),
@@ -44,7 +44,7 @@
@Sampled
@Composable
fun SymmetricPaddingModifier() {
- Stack(Modifier.drawBackground(Color.Gray)) {
+ Stack(Modifier.background(color = Color.Gray)) {
Box(
Modifier.padding(horizontal = 20.dp, vertical = 30.dp).preferredSize(50.dp),
backgroundColor = Color.Blue
@@ -55,7 +55,7 @@
@Sampled
@Composable
fun PaddingAllModifier() {
- Stack(Modifier.drawBackground(Color.Gray)) {
+ Stack(Modifier.background(color = Color.Gray)) {
Box(Modifier.padding(all = 20.dp).preferredSize(50.dp), backgroundColor = Color.Blue)
}
}
@@ -64,7 +64,7 @@
@Composable
fun PaddingInnerPaddingModifier() {
val innerPadding = InnerPadding(top = 10.dp, start = 15.dp)
- Stack(Modifier.drawBackground(Color.Gray)) {
+ Stack(Modifier.background(color = Color.Gray)) {
Box(Modifier.padding(innerPadding).preferredSize(50.dp), backgroundColor = Color.Blue)
}
}
@@ -72,7 +72,7 @@
@Sampled
@Composable
fun AbsolutePaddingModifier() {
- Stack(Modifier.drawBackground(Color.Gray)) {
+ Stack(Modifier.background(color = Color.Gray)) {
Box(
Modifier.absolutePadding(left = 20.dp, top = 30.dp, right = 20.dp, bottom = 30.dp)
.preferredSize(50.dp),
diff --git a/ui/ui-layout/samples/src/main/java/androidx/ui/layout/samples/RowSample.kt b/ui/ui-layout/samples/src/main/java/androidx/ui/layout/samples/RowSample.kt
index 43d8460..554c2fd9 100644
--- a/ui/ui-layout/samples/src/main/java/androidx/ui/layout/samples/RowSample.kt
+++ b/ui/ui-layout/samples/src/main/java/androidx/ui/layout/samples/RowSample.kt
@@ -23,7 +23,7 @@
import androidx.ui.core.Modifier
import androidx.ui.foundation.Box
import androidx.ui.foundation.Text
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.graphics.Color
import androidx.ui.layout.Row
import androidx.ui.layout.fillMaxHeight
@@ -91,7 +91,7 @@
)
Text(
text = "Text.",
- modifier = Modifier.alignWithSiblings(FirstBaseline).drawBackground(Color.Cyan)
+ modifier = Modifier.alignWithSiblings(FirstBaseline).background(color = Color.Cyan)
)
}
}
diff --git a/ui/ui-layout/samples/src/main/java/androidx/ui/layout/samples/SizeModifierSample.kt b/ui/ui-layout/samples/src/main/java/androidx/ui/layout/samples/SizeModifierSample.kt
index ec53828..9eae4d1 100644
--- a/ui/ui-layout/samples/src/main/java/androidx/ui/layout/samples/SizeModifierSample.kt
+++ b/ui/ui-layout/samples/src/main/java/androidx/ui/layout/samples/SizeModifierSample.kt
@@ -22,7 +22,7 @@
import androidx.ui.core.Modifier
import androidx.ui.foundation.Box
import androidx.ui.foundation.ContentGravity
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.graphics.Color
import androidx.ui.layout.Stack
import androidx.ui.layout.aspectRatio
@@ -115,7 +115,7 @@
@Composable
fun SimpleFillWidthModifier() {
Box(Modifier.fillMaxWidth(), backgroundColor = Color.Red, gravity = ContentGravity.Center) {
- Box(Modifier.preferredSize(100.dp).drawBackground(Color.Magenta))
+ Box(Modifier.preferredSize(100.dp).background(color = Color.Magenta))
}
}
@@ -123,7 +123,7 @@
@Composable
fun SimpleFillHeightModifier() {
Box(Modifier.fillMaxHeight(), backgroundColor = Color.Red, gravity = ContentGravity.Center) {
- Box(Modifier.preferredSize(100.dp).drawBackground(Color.Magenta))
+ Box(Modifier.preferredSize(100.dp).background(color = Color.Magenta))
}
}
@@ -131,7 +131,7 @@
@Composable
fun SimpleFillModifier() {
Box(Modifier.fillMaxSize(), backgroundColor = Color.Red, gravity = ContentGravity.Center) {
- Box(Modifier.preferredSize(100.dp).drawBackground(Color.Magenta))
+ Box(Modifier.preferredSize(100.dp).background(color = Color.Magenta))
}
}
diff --git a/ui/ui-material/integration-tests/material-studies/src/main/java/androidx/ui/material/studies/rally/CommonUi.kt b/ui/ui-material/integration-tests/material-studies/src/main/java/androidx/ui/material/studies/rally/CommonUi.kt
index 027300f..6b729a4 100644
--- a/ui/ui-material/integration-tests/material-studies/src/main/java/androidx/ui/material/studies/rally/CommonUi.kt
+++ b/ui/ui-material/integration-tests/material-studies/src/main/java/androidx/ui/material/studies/rally/CommonUi.kt
@@ -21,7 +21,7 @@
import androidx.ui.core.Modifier
import androidx.ui.foundation.Box
import androidx.ui.foundation.Text
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.graphics.Color
import androidx.ui.layout.Arrangement
import androidx.ui.layout.Column
@@ -112,7 +112,7 @@
*/
@Composable
private fun AccountIndicator(color: Color, modifier: Modifier = Modifier) {
- Box(modifier.preferredSize(4.dp, 36.dp).drawBackground(color))
+ Box(modifier.preferredSize(4.dp, 36.dp).background(color = color))
}
@Composable
diff --git a/ui/ui-material/samples/src/main/java/androidx/ui/material/samples/TabSamples.kt b/ui/ui-material/samples/src/main/java/androidx/ui/material/samples/TabSamples.kt
index 04fec22..129ad18 100644
--- a/ui/ui-material/samples/src/main/java/androidx/ui/material/samples/TabSamples.kt
+++ b/ui/ui-material/samples/src/main/java/androidx/ui/material/samples/TabSamples.kt
@@ -35,7 +35,7 @@
import androidx.ui.foundation.ContentGravity
import androidx.ui.foundation.Icon
import androidx.ui.foundation.Text
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.foundation.drawBorder
import androidx.ui.foundation.shape.corner.RoundedCornerShape
import androidx.ui.graphics.Color
@@ -260,7 +260,7 @@
Box(
Modifier.preferredSize(10.dp)
.gravity(Alignment.CenterHorizontally)
- .drawBackground(color = if (selected) Color.Red else Color.White),
+ .background(color = if (selected) Color.Red else Color.White),
children = emptyContent()
)
Text(
diff --git a/ui/ui-material/samples/src/main/java/androidx/ui/material/samples/ThemeSamples.kt b/ui/ui-material/samples/src/main/java/androidx/ui/material/samples/ThemeSamples.kt
index aa55d62..818a35e 100644
--- a/ui/ui-material/samples/src/main/java/androidx/ui/material/samples/ThemeSamples.kt
+++ b/ui/ui-material/samples/src/main/java/androidx/ui/material/samples/ThemeSamples.kt
@@ -21,7 +21,7 @@
import androidx.ui.core.Modifier
import androidx.ui.foundation.Box
import androidx.ui.foundation.Text
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.foundation.isSystemInDarkTheme
import androidx.ui.graphics.Color
import androidx.ui.layout.aspectRatio
@@ -72,7 +72,7 @@
@Composable
fun ThemeColorSample() {
val colors = MaterialTheme.colors
- Box(Modifier.aspectRatio(1f).fillMaxSize().drawBackground(colors.primary))
+ Box(Modifier.aspectRatio(1f).fillMaxSize().background(color = colors.primary))
}
@Sampled
diff --git a/ui/ui-material/src/androidTest/java/androidx/ui/material/DrawerTest.kt b/ui/ui-material/src/androidTest/java/androidx/ui/material/DrawerTest.kt
index 01d845c..a6f4e69 100644
--- a/ui/ui-material/src/androidTest/java/androidx/ui/material/DrawerTest.kt
+++ b/ui/ui-material/src/androidTest/java/androidx/ui/material/DrawerTest.kt
@@ -25,8 +25,8 @@
import androidx.ui.core.onPositioned
import androidx.ui.core.testTag
import androidx.ui.foundation.Box
+import androidx.ui.foundation.background
import androidx.ui.foundation.clickable
-import androidx.ui.foundation.drawBackground
import androidx.ui.geometry.Offset
import androidx.ui.graphics.Color
import androidx.ui.layout.fillMaxSize
@@ -341,10 +341,10 @@
Box(Modifier.testTag("Drawer")) {
ModalDrawerLayout(drawerState.value, { drawerState.value = it },
drawerContent = {
- Box(Modifier.fillMaxSize().drawBackground(Color.Magenta))
+ Box(Modifier.fillMaxSize().background(color = Color.Magenta))
},
bodyContent = {
- Box(Modifier.fillMaxSize().drawBackground(Color.Red))
+ Box(Modifier.fillMaxSize().background(color = Color.Red))
})
}
}
@@ -372,10 +372,10 @@
Box(Modifier.testTag("Drawer").rtl) {
ModalDrawerLayout(drawerState.value, { drawerState.value = it },
drawerContent = {
- Box(Modifier.fillMaxSize().drawBackground(Color.Magenta))
+ Box(Modifier.fillMaxSize().background(color = Color.Magenta))
},
bodyContent = {
- Box(Modifier.fillMaxSize().drawBackground(Color.Red))
+ Box(Modifier.fillMaxSize().background(color = Color.Red))
})
}
}
@@ -403,10 +403,10 @@
Box(Modifier.testTag("Drawer")) {
BottomDrawerLayout(drawerState.value, { drawerState.value = it },
drawerContent = {
- Box(Modifier.fillMaxSize().drawBackground(Color.Magenta))
+ Box(Modifier.fillMaxSize().background(color = Color.Magenta))
},
bodyContent = {
- Box(Modifier.fillMaxSize().drawBackground(Color.Red))
+ Box(Modifier.fillMaxSize().background(color = Color.Red))
})
}
}
@@ -434,10 +434,10 @@
Box(Modifier.testTag("Drawer")) {
BottomDrawerLayout(drawerState.value, { drawerState.value = it },
drawerContent = {
- Box(Modifier.fillMaxSize().drawBackground(Color.Magenta))
+ Box(Modifier.fillMaxSize().background(Color.Magenta))
},
bodyContent = {
- Box(Modifier.fillMaxSize().drawBackground(Color.Red))
+ Box(Modifier.fillMaxSize().background(Color.Red))
})
}
}
diff --git a/ui/ui-material/src/androidTest/java/androidx/ui/material/MenuTest.kt b/ui/ui-material/src/androidTest/java/androidx/ui/material/MenuTest.kt
index 61d01e3..10e6c73 100644
--- a/ui/ui-material/src/androidTest/java/androidx/ui/material/MenuTest.kt
+++ b/ui/ui-material/src/androidTest/java/androidx/ui/material/MenuTest.kt
@@ -27,9 +27,9 @@
import androidx.ui.core.testTag
import androidx.ui.foundation.Box
import androidx.ui.foundation.Text
+import androidx.ui.foundation.background
import androidx.ui.foundation.clickable
import androidx.ui.foundation.contentColor
-import androidx.ui.foundation.drawBackground
import androidx.ui.graphics.Color
import androidx.ui.layout.preferredSize
import androidx.ui.layout.size
@@ -69,7 +69,7 @@
DropdownMenu(
expanded = expanded,
toggle = {
- Box(Modifier.size(20.dp).drawBackground(Color.Blue))
+ Box(Modifier.size(20.dp).background(color = Color.Blue))
},
>
) {
@@ -103,7 +103,7 @@
DropdownMenu(
expanded = true,
toggle = {
- Box(Modifier.size(20.toDp()).drawBackground(Color.Blue))
+ Box(Modifier.size(20.toDp()).background(color = Color.Blue))
},
>
) {
diff --git a/ui/ui-material/src/androidTest/java/androidx/ui/material/ScaffoldTest.kt b/ui/ui-material/src/androidTest/java/androidx/ui/material/ScaffoldTest.kt
index 695b856..83552b8 100644
--- a/ui/ui-material/src/androidTest/java/androidx/ui/material/ScaffoldTest.kt
+++ b/ui/ui-material/src/androidTest/java/androidx/ui/material/ScaffoldTest.kt
@@ -31,7 +31,7 @@
import androidx.ui.foundation.Box
import androidx.ui.foundation.Icon
import androidx.ui.foundation.Text
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.geometry.Offset
import androidx.ui.graphics.Color
import androidx.ui.layout.DpConstraints
@@ -118,7 +118,7 @@
}
.fillMaxWidth()
.preferredHeight(50.dp)
- .drawBackground(Color.Red)
+ .background(color = Color.Red)
)
}
) {
@@ -126,7 +126,7 @@
.onPositioned { contentPosition = it.localToGlobal(Offset.Zero) }
.fillMaxWidth()
.preferredHeight(50.dp)
- .drawBackground(Color.Blue)
+ .background(Color.Blue)
)
}
}
@@ -150,7 +150,7 @@
}
.fillMaxWidth()
.preferredHeight(50.dp)
- .drawBackground(Color.Red)
+ .background(color = Color.Red)
)
}
) {
@@ -161,7 +161,7 @@
}
.fillMaxWidth()
.preferredHeight(50.dp)
- .drawBackground(Color.Blue)
+ .background(color = Color.Blue)
)
}
}
@@ -186,7 +186,7 @@
}
.fillMaxWidth()
.preferredHeight(50.dp)
- .drawBackground(Color.Blue)
+ .background(color = Color.Blue)
)
}
) {
@@ -194,7 +194,7 @@
Modifier
.fillMaxWidth()
.preferredHeight(50.dp)
- .drawBackground(Color.Blue)
+ .background(color = Color.Blue)
)
}
}
@@ -239,7 +239,7 @@
}
.fillMaxWidth()
.preferredHeight(50.dp)
- .drawBackground(Color.Blue)
+ .background(color = Color.Blue)
)
}
) {
@@ -247,7 +247,7 @@
Modifier
.fillMaxWidth()
.preferredHeight(50.dp)
- .drawBackground(Color.Blue)
+ .background(color = Color.Blue)
)
}
}
@@ -290,7 +290,7 @@
}
.fillMaxWidth()
.preferredHeight(100.dp)
- .drawBackground(Color.Red)
+ .background(color = Color.Red)
)
}
) {
@@ -329,7 +329,7 @@
}
.fillMaxWidth()
.preferredHeight(100.dp)
- .drawBackground(Color.Red)
+ .background(color = Color.Red)
)
}
) {
@@ -355,13 +355,13 @@
Box(
Modifier.size(10.dp)
.drawShadow(4.dp)
- .drawBackground(Color.White)
+ .background(color = Color.White)
)
}
) {
Box(
Modifier.size(10.dp)
- .drawBackground(Color.White)
+ .background(color = Color.White)
)
}
}
@@ -429,7 +429,7 @@
}
.fillMaxWidth()
.preferredHeight(100.dp)
- .drawBackground(Color.Red)
+ .background(color = Color.Red)
)
}
} else {
@@ -466,7 +466,7 @@
}
.fillMaxWidth()
.preferredHeight(100.dp)
- .drawBackground(Color.Red)
+ .background(color = Color.Red)
)
}
} else {
@@ -505,7 +505,7 @@
}
.fillMaxWidth()
.preferredHeight(100.dp)
- .drawBackground(Color.Red)
+ .background(color = Color.Red)
)
}
) {
@@ -537,7 +537,7 @@
}
.fillMaxWidth()
.preferredHeight(100.dp)
- .drawBackground(Color.Red)
+ .background(color = Color.Red)
)
}
) {
diff --git a/ui/ui-material/src/androidTest/java/androidx/ui/material/SliderTest.kt b/ui/ui-material/src/androidTest/java/androidx/ui/material/SliderTest.kt
index 2c9bf07..f3864a7 100644
--- a/ui/ui-material/src/androidTest/java/androidx/ui/material/SliderTest.kt
+++ b/ui/ui-material/src/androidTest/java/androidx/ui/material/SliderTest.kt
@@ -23,7 +23,7 @@
import androidx.ui.core.DensityAmbient
import androidx.ui.core.Modifier
import androidx.ui.core.testTag
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.geometry.Offset
import androidx.ui.graphics.Color
import androidx.ui.graphics.compositeOver
@@ -266,7 +266,7 @@
thumbStrokeWidth = TrackHeight.toIntPx()
thumbPx = ThumbRadius.toIntPx()
}
- Slider(modifier = Modifier.testTag(sliderTag).drawBackground(Color.Gray),
+ Slider(modifier = Modifier.testTag(sliderTag).background(color = Color.Gray),
color = Color.Green,
value = 0.5f,
>
diff --git a/ui/ui-material/src/androidTest/java/androidx/ui/material/SurfaceTest.kt b/ui/ui-material/src/androidTest/java/androidx/ui/material/SurfaceTest.kt
index f10e94b..7682e92 100644
--- a/ui/ui-material/src/androidTest/java/androidx/ui/material/SurfaceTest.kt
+++ b/ui/ui-material/src/androidTest/java/androidx/ui/material/SurfaceTest.kt
@@ -24,7 +24,7 @@
import androidx.ui.core.testTag
import androidx.ui.core.zIndex
import androidx.ui.foundation.Box
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.graphics.Color
import androidx.ui.graphics.RectangleShape
import androidx.ui.layout.Stack
@@ -109,7 +109,7 @@
.preferredSize(10.dp, 10.dp)
.semantics(mergeAllDescendants = true) {}
.testTag("stack")) {
- Box(Modifier.fillMaxSize().drawBackground(Color.Green).zIndex(3f))
+ Box(Modifier.fillMaxSize().background(color = Color.Green).zIndex(3f))
Surface(color = Color.Yellow, elevation = 2.dp) {
Box(Modifier.fillMaxSize())
}
@@ -134,7 +134,7 @@
.preferredSize(10.dp, 10.dp)
.semantics(mergeAllDescendants = true) {}
.testTag("stack")) {
- Box(Modifier.fillMaxSize().drawBackground(Color.Green).zIndex(1f))
+ Box(Modifier.fillMaxSize().background(color = Color.Green).zIndex(1f))
Surface(color = Color.Yellow, elevation = 2.dp) {
Box(Modifier.fillMaxSize())
}
diff --git a/ui/ui-material/src/androidTest/java/androidx/ui/material/TabTest.kt b/ui/ui-material/src/androidTest/java/androidx/ui/material/TabTest.kt
index be7c851..7528721 100644
--- a/ui/ui-material/src/androidTest/java/androidx/ui/material/TabTest.kt
+++ b/ui/ui-material/src/androidTest/java/androidx/ui/material/TabTest.kt
@@ -25,7 +25,7 @@
import androidx.ui.foundation.Box
import androidx.ui.foundation.Icon
import androidx.ui.foundation.Text
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.graphics.Color
import androidx.ui.layout.fillMaxWidth
import androidx.ui.layout.preferredHeight
@@ -109,10 +109,11 @@
val indicatorContainer = @Composable { tabPositions: List<TabRow.TabPosition> ->
TabRow.IndicatorContainer(tabPositions, state) {
- Box(Modifier
- .fillMaxWidth()
- .preferredHeight(indicatorHeight)
- .drawBackground(Color.Red)
+ Box(
+ Modifier
+ .fillMaxWidth()
+ .preferredHeight(indicatorHeight)
+ .background(color = Color.Red)
.testTag("indicator")
)
}
@@ -275,10 +276,11 @@
val indicatorContainer = @Composable { tabPositions: List<TabRow.TabPosition> ->
TabRow.IndicatorContainer(tabPositions, state) {
- Box(Modifier
- .fillMaxWidth()
- .preferredHeight(indicatorHeight)
- .drawBackground(Color.Red)
+ Box(
+ Modifier
+ .fillMaxWidth()
+ .preferredHeight(indicatorHeight)
+ .background(color = Color.Red)
.testTag("indicator")
)
}
diff --git a/ui/ui-material/src/androidTest/java/androidx/ui/material/textfield/FilledTextFieldTest.kt b/ui/ui-material/src/androidTest/java/androidx/ui/material/textfield/FilledTextFieldTest.kt
index c4f64ec..6a71f16 100644
--- a/ui/ui-material/src/androidTest/java/androidx/ui/material/textfield/FilledTextFieldTest.kt
+++ b/ui/ui-material/src/androidTest/java/androidx/ui/material/textfield/FilledTextFieldTest.kt
@@ -29,9 +29,9 @@
import androidx.ui.core.testTag
import androidx.ui.foundation.Box
import androidx.ui.foundation.Text
+import androidx.ui.foundation.background
import androidx.ui.foundation.contentColor
import androidx.ui.foundation.currentTextStyle
-import androidx.ui.foundation.drawBackground
import androidx.ui.geometry.Offset
import androidx.ui.graphics.Color
import androidx.ui.graphics.RectangleShape
@@ -695,7 +695,7 @@
val latch = CountDownLatch(1)
testRule.setMaterialContent {
- Stack(Modifier.drawBackground(Color.White)) {
+ Stack(Modifier.background(color = Color.White)) {
FilledTextField(
modifier = Modifier.testTag(TextfieldTag),
value = "",
diff --git a/ui/ui-material/src/androidTest/java/androidx/ui/material/textfield/OutlinedTextFieldTest.kt b/ui/ui-material/src/androidTest/java/androidx/ui/material/textfield/OutlinedTextFieldTest.kt
index 47c544b..3bfc7da 100644
--- a/ui/ui-material/src/androidTest/java/androidx/ui/material/textfield/OutlinedTextFieldTest.kt
+++ b/ui/ui-material/src/androidTest/java/androidx/ui/material/textfield/OutlinedTextFieldTest.kt
@@ -29,9 +29,9 @@
import androidx.ui.core.testTag
import androidx.ui.foundation.Box
import androidx.ui.foundation.Text
+import androidx.ui.foundation.background
import androidx.ui.foundation.contentColor
import androidx.ui.foundation.currentTextStyle
-import androidx.ui.foundation.drawBackground
import androidx.ui.geometry.Offset
import androidx.ui.graphics.Color
import androidx.ui.graphics.RectangleShape
@@ -582,7 +582,7 @@
@SdkSuppress(minSdkVersion = Build.VERSION_CODES.O)
fun testOutlinedTextField_visualTransformationPropagated() {
testRule.setMaterialContent {
- Box(Modifier.drawBackground(Color.White)) {
+ Box(Modifier.background(color = Color.White)) {
OutlinedTextField(
modifier = Modifier.testTag(TextfieldTag),
value = "qwerty",
diff --git a/ui/ui-material/src/androidTest/java/androidx/ui/material/textfield/TextFieldTest.kt b/ui/ui-material/src/androidTest/java/androidx/ui/material/textfield/TextFieldTest.kt
index ed8a803..7795b03 100644
--- a/ui/ui-material/src/androidTest/java/androidx/ui/material/textfield/TextFieldTest.kt
+++ b/ui/ui-material/src/androidTest/java/androidx/ui/material/textfield/TextFieldTest.kt
@@ -23,7 +23,7 @@
import androidx.ui.core.Modifier
import androidx.ui.core.testTag
import androidx.ui.foundation.TextField
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.graphics.Color
import androidx.ui.input.TextFieldValue
import androidx.ui.layout.Stack
@@ -122,7 +122,7 @@
Stack(
Modifier
.preferredSize(parentSize.toDp())
- .drawBackground(Color.White)
+ .background(color = Color.White)
.testTag(TextfieldTag)
) {
TextFieldScroller(
diff --git a/ui/ui-material/src/main/java/androidx/ui/material/Divider.kt b/ui/ui-material/src/main/java/androidx/ui/material/Divider.kt
index 1199d6a..f626f18 100644
--- a/ui/ui-material/src/main/java/androidx/ui/material/Divider.kt
+++ b/ui/ui-material/src/main/java/androidx/ui/material/Divider.kt
@@ -19,7 +19,7 @@
import androidx.compose.Composable
import androidx.ui.core.Modifier
import androidx.ui.foundation.Box
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.graphics.Color
import androidx.ui.layout.fillMaxWidth
import androidx.ui.layout.padding
@@ -46,7 +46,12 @@
} else {
Modifier
}
- Box(modifier.plus(indentMod).fillMaxWidth().preferredHeight(thickness).drawBackground(color))
+ Box(
+ modifier.plus(indentMod)
+ .fillMaxWidth()
+ .preferredHeight(thickness)
+ .background(color = color)
+ )
}
private const val DividerAlpha = 0.12f
diff --git a/ui/ui-material/src/main/java/androidx/ui/material/FilledTextField.kt b/ui/ui-material/src/main/java/androidx/ui/material/FilledTextField.kt
index 741460c..95c43ea 100644
--- a/ui/ui-material/src/main/java/androidx/ui/material/FilledTextField.kt
+++ b/ui/ui-material/src/main/java/androidx/ui/material/FilledTextField.kt
@@ -31,8 +31,8 @@
import androidx.ui.core.offset
import androidx.ui.foundation.Box
import androidx.ui.foundation.Text
+import androidx.ui.foundation.background
import androidx.ui.foundation.currentTextStyle
-import androidx.ui.foundation.drawBackground
import androidx.ui.foundation.shape.corner.ZeroCornerSize
import androidx.ui.geometry.Offset
import androidx.ui.graphics.Color
@@ -324,7 +324,7 @@
// places leading icon, text field with label and placeholder, trailing icon
IconsWithTextFieldLayout(
modifier = textFieldModifier
- .drawBackground(
+ .background(
color = backgroundColor.applyAlpha(alpha = ContainerAlpha),
shape = shape
)
diff --git a/ui/ui-material/src/main/java/androidx/ui/material/Surface.kt b/ui/ui-material/src/main/java/androidx/ui/material/Surface.kt
index 1c471f4..17b34a6 100644
--- a/ui/ui-material/src/main/java/androidx/ui/material/Surface.kt
+++ b/ui/ui-material/src/main/java/androidx/ui/material/Surface.kt
@@ -27,7 +27,7 @@
import androidx.ui.foundation.ContentColorAmbient
import androidx.ui.foundation.ProvideTextStyle
import androidx.ui.foundation.Text
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.foundation.drawBorder
import androidx.ui.graphics.Color
import androidx.ui.graphics.RectangleShape
@@ -91,7 +91,7 @@
modifier.drawShadow(elevation = elevation, shape = shape, clip = false)
.zIndex(elevation.value)
.plus(if (border != null) Modifier.drawBorder(border, shape) else Modifier)
- .drawBackground(
+ .background(
color = getBackgroundColorForElevation(color, elevation),
shape = shape
)
diff --git a/ui/ui-material/src/main/java/androidx/ui/material/Tab.kt b/ui/ui-material/src/main/java/androidx/ui/material/Tab.kt
index 741d08a..7da56cd 100644
--- a/ui/ui-material/src/main/java/androidx/ui/material/Tab.kt
+++ b/ui/ui-material/src/main/java/androidx/ui/material/Tab.kt
@@ -46,8 +46,8 @@
import androidx.ui.foundation.ProvideTextStyle
import androidx.ui.foundation.ScrollState
import androidx.ui.foundation.ScrollableRow
+import androidx.ui.foundation.background
import androidx.ui.foundation.contentColor
-import androidx.ui.foundation.drawBackground
import androidx.ui.foundation.rememberScrollState
import androidx.ui.foundation.selection.selectable
import androidx.ui.graphics.Color
@@ -405,7 +405,7 @@
*/
@Composable
fun Indicator(modifier: Modifier = Modifier, color: Color = contentColor()) {
- Box(modifier.fillMaxWidth().preferredHeight(IndicatorHeight).drawBackground(color))
+ Box(modifier.fillMaxWidth().preferredHeight(IndicatorHeight).background(color = color))
}
/**
diff --git a/ui/ui-test/src/androidTest/java/androidx/ui/test/BitmapCapturingTest.kt b/ui/ui-test/src/androidTest/java/androidx/ui/test/BitmapCapturingTest.kt
index e51c8d3..f4acb99 100644
--- a/ui/ui-test/src/androidTest/java/androidx/ui/test/BitmapCapturingTest.kt
+++ b/ui/ui-test/src/androidTest/java/androidx/ui/test/BitmapCapturingTest.kt
@@ -24,7 +24,7 @@
import androidx.ui.core.Modifier
import androidx.ui.core.testTag
import androidx.ui.foundation.Box
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.graphics.Color
import androidx.ui.layout.Column
import androidx.ui.layout.Row
@@ -164,27 +164,28 @@
Box(Modifier.padding(top = 20.toDp()), backgroundColor = colorBg) {
Column(Modifier.testTag(rootTag)) {
Row {
- Box(Modifier
- .testTag(tag11)
- .preferredSize(100.toDp(), 50.toDp())
- .drawBackground(color11)
+ Box(
+ Modifier
+ .testTag(tag11)
+ .preferredSize(100.toDp(), 50.toDp())
+ .background(color = color11)
)
Box(Modifier
.testTag(tag12)
.preferredSize(100.toDp(), 50.toDp())
- .drawBackground(color12)
+ .background(color12)
)
}
Row {
Box(Modifier
.testTag(tag21)
.preferredSize(100.toDp(), 50.toDp())
- .drawBackground(color21)
+ .background(color21)
)
Box(Modifier
.testTag(tag22)
.preferredSize(100.toDp(), 50.toDp())
- .drawBackground(color22)
+ .background(color22)
)
}
}
diff --git a/ui/ui-test/src/androidTest/java/androidx/ui/test/ComposeIdlingResourceTest.kt b/ui/ui-test/src/androidTest/java/androidx/ui/test/ComposeIdlingResourceTest.kt
index 8e437c6..1d418c8 100644
--- a/ui/ui-test/src/androidTest/java/androidx/ui/test/ComposeIdlingResourceTest.kt
+++ b/ui/ui-test/src/androidTest/java/androidx/ui/test/ComposeIdlingResourceTest.kt
@@ -32,7 +32,7 @@
import androidx.ui.core.Modifier
import androidx.ui.foundation.Box
import androidx.ui.foundation.Canvas
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.geometry.Offset
import androidx.ui.geometry.Size
import androidx.ui.graphics.Color
@@ -178,7 +178,7 @@
@Composable
private fun Ui(animationState: State<AnimationStates>) {
hasRecomposed = true
- Box(modifier = Modifier.drawBackground(Color.Yellow).fillMaxSize()) {
+ Box(modifier = Modifier.background(color = Color.Yellow).fillMaxSize()) {
hasRecomposed = true
val state = transition(
definition = animationDefinition,
diff --git a/ui/ui-test/src/androidTest/java/androidx/ui/test/TestAnimationClockTest.kt b/ui/ui-test/src/androidTest/java/androidx/ui/test/TestAnimationClockTest.kt
index dcda6e7..3887f12 100644
--- a/ui/ui-test/src/androidTest/java/androidx/ui/test/TestAnimationClockTest.kt
+++ b/ui/ui-test/src/androidTest/java/androidx/ui/test/TestAnimationClockTest.kt
@@ -34,7 +34,7 @@
import androidx.ui.core.Modifier
import androidx.ui.foundation.Box
import androidx.ui.foundation.Canvas
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.geometry.Offset
import androidx.ui.geometry.Size
import androidx.ui.graphics.Color
@@ -184,7 +184,7 @@
private fun Ui(animationState: State<AnimationStates>) {
val size = Size(50.0f, 50.0f)
hasRecomposed = true
- Box(modifier = Modifier.drawBackground(Color.Yellow).fillMaxSize()) {
+ Box(modifier = Modifier.background(color = Color.Yellow).fillMaxSize()) {
hasRecomposed = true
val state = transition(
definition = animationDefinition,
diff --git a/ui/ui-test/src/androidTest/java/androidx/ui/test/assertions/BoundsAssertionsTest.kt b/ui/ui-test/src/androidTest/java/androidx/ui/test/assertions/BoundsAssertionsTest.kt
index 26ca383..0a38acd 100644
--- a/ui/ui-test/src/androidTest/java/androidx/ui/test/assertions/BoundsAssertionsTest.kt
+++ b/ui/ui-test/src/androidTest/java/androidx/ui/test/assertions/BoundsAssertionsTest.kt
@@ -21,7 +21,7 @@
import androidx.ui.core.Modifier
import androidx.ui.core.testTag
import androidx.ui.foundation.Box
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.graphics.Color
import androidx.ui.layout.fillMaxSize
import androidx.ui.layout.padding
@@ -64,7 +64,7 @@
Box(modifier = Modifier
.testTag(tag)
.size(80.dp, 100.dp)
- .drawBackground(Color.Black)
+ .background(color = Color.Black)
)
}
}
diff --git a/ui/ui-text/integration-tests/ui-text-compose-demos/src/main/java/androidx/ui/text/demos/ComposeVariousInputField.kt b/ui/ui-text/integration-tests/ui-text-compose-demos/src/main/java/androidx/ui/text/demos/ComposeVariousInputField.kt
index 01351ca..3fc0785 100644
--- a/ui/ui-text/integration-tests/ui-text-compose-demos/src/main/java/androidx/ui/text/demos/ComposeVariousInputField.kt
+++ b/ui/ui-text/integration-tests/ui-text-compose-demos/src/main/java/androidx/ui/text/demos/ComposeVariousInputField.kt
@@ -28,7 +28,7 @@
import androidx.ui.foundation.ScrollableColumn
import androidx.ui.foundation.Text
import androidx.ui.foundation.TextField
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.geometry.Rect
import androidx.ui.graphics.Color
import androidx.ui.input.ImeAction
@@ -247,7 +247,7 @@
// Force 4 with red color cursor
Layout(
children = emptyContent(),
- modifier = Modifier.drawBackground(Color.Red)
+ modifier = Modifier.background(color = Color.Red)
) { _, constraints -> layout(4, constraints.maxHeight) {} }
}
}
diff --git a/ui/ui-text/integration-tests/ui-text-compose-demos/src/main/java/androidx/ui/text/demos/TailFollowingTextField.kt b/ui/ui-text/integration-tests/ui-text-compose-demos/src/main/java/androidx/ui/text/demos/TailFollowingTextField.kt
index 8debecb..ff406da 100644
--- a/ui/ui-text/integration-tests/ui-text-compose-demos/src/main/java/androidx/ui/text/demos/TailFollowingTextField.kt
+++ b/ui/ui-text/integration-tests/ui-text-compose-demos/src/main/java/androidx/ui/text/demos/TailFollowingTextField.kt
@@ -23,7 +23,7 @@
import androidx.ui.core.clipToBounds
import androidx.ui.core.constrainWidth
import androidx.ui.foundation.TextField
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.graphics.Color
import androidx.ui.input.TextFieldValue
import androidx.ui.layout.Column
@@ -48,7 +48,7 @@
modifier = Modifier
.padding(20.dp)
.fillMaxWidth()
- .drawBackground(Color.Gray)
+ .background(color = Color.Gray)
.clipToBounds()
)
@@ -62,7 +62,7 @@
.padding(20.dp)
.fillMaxWidth()
.height(120.dp)
- .drawBackground(Color.Gray)
+ .background(Color.Gray)
.clipToBounds()
)
}
diff --git a/ui/ui-text/samples/src/main/java/androidx/ui/text/samples/InlineTextContentSample.kt b/ui/ui-text/samples/src/main/java/androidx/ui/text/samples/InlineTextContentSample.kt
index 3e7cea8..db0d9ef 100644
--- a/ui/ui-text/samples/src/main/java/androidx/ui/text/samples/InlineTextContentSample.kt
+++ b/ui/ui-text/samples/src/main/java/androidx/ui/text/samples/InlineTextContentSample.kt
@@ -21,9 +21,8 @@
import androidx.ui.core.Modifier
import androidx.ui.foundation.Box
import androidx.ui.foundation.Text
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.graphics.Color
-import androidx.ui.graphics.RectangleShape
import androidx.ui.layout.fillMaxSize
import androidx.ui.text.InlineTextContent
import androidx.ui.text.Placeholder
@@ -57,7 +56,7 @@
// This [Box] will fill maximum size, which is specified by the [Placeholder]
// above. Notice the width and height in [Placeholder] are specified in TextUnit,
// and are converted into pixel by text layout.
- Box(modifier = Modifier.fillMaxSize().drawBackground(Color.Red, RectangleShape))
+ Box(modifier = Modifier.fillMaxSize().background(color = Color.Red))
}
)
)
diff --git a/ui/ui-tooling/src/androidTest/java/androidx/ui/tooling/InspectableTests.kt b/ui/ui-tooling/src/androidTest/java/androidx/ui/tooling/InspectableTests.kt
index 13ac520..da8bc38 100644
--- a/ui/ui-tooling/src/androidTest/java/androidx/ui/tooling/InspectableTests.kt
+++ b/ui/ui-tooling/src/androidTest/java/androidx/ui/tooling/InspectableTests.kt
@@ -22,7 +22,7 @@
import androidx.ui.core.Modifier
import androidx.ui.core.drawBehind
import androidx.ui.foundation.Box
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.graphics.Color
import androidx.ui.layout.Column
import androidx.ui.layout.preferredSize
@@ -289,7 +289,7 @@
Inspectable(SlotTableRecord.create()) {
Column {
InInspectionModeOnly {
- Box(Modifier.preferredSize(100.dp).drawBackground(Color(0xFF)))
+ Box(Modifier.preferredSize(100.dp).background(color = Color(0xFF)))
displayed = true
}
}
@@ -305,7 +305,7 @@
show {
Column {
InInspectionModeOnly {
- Box(Modifier.preferredSize(100.dp).drawBackground(Color(0xFF)))
+ Box(Modifier.preferredSize(100.dp).background(color = Color(0xFF)))
displayed = true
}
}
diff --git a/ui/ui-tooling/src/androidTest/java/androidx/ui/tooling/ModifierInfoTest.kt b/ui/ui-tooling/src/androidTest/java/androidx/ui/tooling/ModifierInfoTest.kt
index 8b7320b..3815c0c 100644
--- a/ui/ui-tooling/src/androidTest/java/androidx/ui/tooling/ModifierInfoTest.kt
+++ b/ui/ui-tooling/src/androidTest/java/androidx/ui/tooling/ModifierInfoTest.kt
@@ -26,7 +26,7 @@
import androidx.ui.core.drawLayer
import androidx.ui.core.positionInRoot
import androidx.ui.foundation.Box
-import androidx.ui.foundation.drawBackground
+import androidx.ui.foundation.background
import androidx.ui.graphics.Color
import androidx.ui.layout.Column
import androidx.ui.layout.padding
@@ -52,7 +52,7 @@
val px10 = 10f.toDp()
val px5 = 5f.toDp()
Box {
- Column(Modifier.padding(px10).drawLayer().drawBackground(Color.Blue)) {
+ Column(Modifier.padding(px10).drawLayer().background(color = Color.Blue)) {
Box(Modifier.padding(px5).size(px5))
}
}