[go: nahoru, domu]

Cleanup Rally screens code & styling

Remove unnecessary containers, cleanup modifiers and
cleanup styling, paddings, etc according to actual
mocks for the main overview screen.

Also add an actual data structure to hold the static
data to avoid duplication.

Bug: 130636326
Test: run & compare appearance to mocks
Change-Id: I832d512f19b0521c29b8a8428b32b7e0d74da28a
diff --git a/ui/ui-material/integration-tests/material-studies/src/main/java/androidx/ui/material/studies/rally/Icons.kt b/ui/ui-material/integration-tests/material-studies/src/main/java/androidx/ui/material/studies/rally/Icons.kt
index 3c45637..1c9f577 100644
--- a/ui/ui-material/integration-tests/material-studies/src/main/java/androidx/ui/material/studies/rally/Icons.kt
+++ b/ui/ui-material/integration-tests/material-studies/src/main/java/androidx/ui/material/studies/rally/Icons.kt
@@ -26,6 +26,7 @@
 import androidx.ui.layout.LayoutHeight
 import androidx.ui.layout.LayoutWidth
 import androidx.ui.material.ripple.Ripple
+import androidx.ui.unit.Dp
 import androidx.ui.unit.dp
 
 /**
@@ -50,8 +51,13 @@
  * 24x24dp icon from a resource id.
  */
 @Composable
-fun Icon(vectorImage: VectorAsset, tintColor: Color = Color.White) {
-    Box(modifier = LayoutHeight(24.dp) + LayoutWidth(24.dp)) {
+fun Icon(
+    vectorImage: VectorAsset,
+    tintColor: Color = Color.White,
+    modifier: Modifier = Modifier.None,
+    size: Dp = 24.dp
+) {
+    Box(modifier = LayoutHeight(size) + LayoutWidth(size) + modifier) {
         DrawVector(
             vectorImage = vectorImage,
             tintColor = tintColor