Change module and package of Dp, IntPx, etc to unit.
Moved units into ui-unit. Moved some basic utilities
to ui-util. Moved rect, etc into ui-geometry.
This is a start to making proper packages for ui-core classes.
Test: ran tests and connectedCheck
Change-Id: I45fe4a154c0f91cb1526cd73aad6e6e8bed3616a
diff --git a/ui/ui-material/src/androidTest/java/androidx/ui/material/AppBarTest.kt b/ui/ui-material/src/androidTest/java/androidx/ui/material/AppBarTest.kt
index 6422e6d..c60531c 100644
--- a/ui/ui-material/src/androidTest/java/androidx/ui/material/AppBarTest.kt
+++ b/ui/ui-material/src/androidTest/java/androidx/ui/material/AppBarTest.kt
@@ -18,32 +18,32 @@
import androidx.compose.Composable
import androidx.test.filters.SmallTest
-import androidx.ui.core.dp
-import androidx.ui.layout.Container
import androidx.ui.core.LastBaseline
import androidx.ui.core.LayoutCoordinates
import androidx.ui.core.OnChildPositioned
-import androidx.ui.core.Px
-import androidx.ui.core.PxPosition
import androidx.ui.core.Text
import androidx.ui.core.currentTextStyle
-import androidx.ui.core.ipx
-import androidx.ui.core.round
-import androidx.ui.core.sp
-import androidx.ui.core.toPx
import androidx.ui.foundation.ColoredRect
import androidx.ui.foundation.shape.corner.CircleShape
import androidx.ui.graphics.Color
+import androidx.ui.layout.Container
import androidx.ui.material.BottomAppBar.FabConfiguration
import androidx.ui.material.BottomAppBar.FabPosition
import androidx.ui.semantics.Semantics
import androidx.ui.semantics.testTag
-import androidx.ui.text.TextStyle
import androidx.ui.test.assertCountEquals
import androidx.ui.test.assertIsVisible
import androidx.ui.test.createComposeRule
import androidx.ui.test.findAllByTag
import androidx.ui.test.findByText
+import androidx.ui.text.TextStyle
+import androidx.ui.unit.Px
+import androidx.ui.unit.PxPosition
+import androidx.ui.unit.dp
+import androidx.ui.unit.ipx
+import androidx.ui.unit.round
+import androidx.ui.unit.sp
+import androidx.ui.unit.toPx
import com.google.common.truth.Truth.assertThat
import org.junit.Rule
import org.junit.Test
diff --git a/ui/ui-material/src/androidTest/java/androidx/ui/material/ButtonTest.kt b/ui/ui-material/src/androidTest/java/androidx/ui/material/ButtonTest.kt
index 2688cd7..49549b0 100644
--- a/ui/ui-material/src/androidTest/java/androidx/ui/material/ButtonTest.kt
+++ b/ui/ui-material/src/androidTest/java/androidx/ui/material/ButtonTest.kt
@@ -19,19 +19,12 @@
import androidx.compose.Composable
import androidx.compose.state
import androidx.test.filters.MediumTest
-import androidx.ui.core.Dp
import androidx.ui.core.LayoutCoordinates
import androidx.ui.core.OnChildPositioned
import androidx.ui.core.OnPositioned
-import androidx.ui.core.PxPosition
-import androidx.ui.core.PxSize
import androidx.ui.core.TestTag
import androidx.ui.core.Text
import androidx.ui.core.currentTextStyle
-import androidx.ui.core.dp
-import androidx.ui.core.sp
-import androidx.ui.core.toPx
-import androidx.ui.core.withDensity
import androidx.ui.layout.Center
import androidx.ui.layout.Column
import androidx.ui.layout.Wrap
@@ -44,6 +37,13 @@
import androidx.ui.test.findByTag
import androidx.ui.test.findByText
import androidx.ui.text.TextStyle
+import androidx.ui.unit.Dp
+import androidx.ui.unit.PxPosition
+import androidx.ui.unit.PxSize
+import androidx.ui.unit.dp
+import androidx.ui.unit.sp
+import androidx.ui.unit.toPx
+import androidx.ui.unit.withDensity
import com.google.common.truth.Truth.assertThat
import org.junit.Rule
import org.junit.Test
diff --git a/ui/ui-material/src/androidTest/java/androidx/ui/material/CheckboxUiTest.kt b/ui/ui-material/src/androidTest/java/androidx/ui/material/CheckboxUiTest.kt
index 659f31b..8abf49f 100644
--- a/ui/ui-material/src/androidTest/java/androidx/ui/material/CheckboxUiTest.kt
+++ b/ui/ui-material/src/androidTest/java/androidx/ui/material/CheckboxUiTest.kt
@@ -18,24 +18,24 @@
import androidx.compose.state
import androidx.test.filters.MediumTest
import androidx.ui.core.TestTag
-import androidx.ui.core.dp
import androidx.ui.foundation.Strings
import androidx.ui.foundation.selection.ToggleableState
-import androidx.ui.foundation.selection.ToggleableState.On
import androidx.ui.foundation.selection.ToggleableState.Indeterminate
import androidx.ui.foundation.selection.ToggleableState.Off
+import androidx.ui.foundation.selection.ToggleableState.On
import androidx.ui.foundation.semantics.toggleableState
import androidx.ui.layout.Column
import androidx.ui.semantics.accessibilityValue
import androidx.ui.test.assertHasNoClickAction
-import androidx.ui.test.assertIsOn
import androidx.ui.test.assertIsOff
+import androidx.ui.test.assertIsOn
import androidx.ui.test.assertSemanticsIsEqualTo
import androidx.ui.test.copyWith
import androidx.ui.test.createComposeRule
import androidx.ui.test.createFullSemantics
import androidx.ui.test.doClick
import androidx.ui.test.findByTag
+import androidx.ui.unit.dp
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
diff --git a/ui/ui-material/src/androidTest/java/androidx/ui/material/DividerUiTest.kt b/ui/ui-material/src/androidTest/java/androidx/ui/material/DividerUiTest.kt
index 9338a0f..2426e20 100644
--- a/ui/ui-material/src/androidTest/java/androidx/ui/material/DividerUiTest.kt
+++ b/ui/ui-material/src/androidTest/java/androidx/ui/material/DividerUiTest.kt
@@ -17,9 +17,9 @@
package androidx.ui.material
import androidx.test.filters.MediumTest
-import androidx.ui.core.dp
-import androidx.ui.core.ipx
import androidx.ui.test.createComposeRule
+import androidx.ui.unit.dp
+import androidx.ui.unit.ipx
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
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 3f915b8..4f9080f 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
@@ -19,17 +19,17 @@
import androidx.compose.Model
import androidx.test.filters.MediumTest
import androidx.ui.core.OnPositioned
-import androidx.ui.core.PxPosition
-import androidx.ui.core.PxSize
import androidx.ui.core.TestTag
-import androidx.ui.core.dp
-import androidx.ui.core.round
import androidx.ui.foundation.Clickable
import androidx.ui.layout.Container
import androidx.ui.semantics.Semantics
import androidx.ui.test.createComposeRule
import androidx.ui.test.doClick
import androidx.ui.test.findByTag
+import androidx.ui.unit.PxPosition
+import androidx.ui.unit.PxSize
+import androidx.ui.unit.dp
+import androidx.ui.unit.round
import com.google.common.truth.Truth.assertThat
import org.junit.Ignore
import org.junit.Rule
diff --git a/ui/ui-material/src/androidTest/java/androidx/ui/material/ElevationOverlayTest.kt b/ui/ui-material/src/androidTest/java/androidx/ui/material/ElevationOverlayTest.kt
index 400b1c9..17f65c7 100644
--- a/ui/ui-material/src/androidTest/java/androidx/ui/material/ElevationOverlayTest.kt
+++ b/ui/ui-material/src/androidTest/java/androidx/ui/material/ElevationOverlayTest.kt
@@ -19,12 +19,7 @@
import android.os.Build
import androidx.test.filters.LargeTest
import androidx.test.filters.SdkSuppress
-import androidx.ui.core.Dp
-import androidx.ui.core.IntPxSize
import androidx.ui.core.TestTag
-import androidx.ui.core.dp
-import androidx.ui.core.ipx
-import androidx.ui.core.withDensity
import androidx.ui.graphics.Color
import androidx.ui.layout.Container
import androidx.ui.material.surface.Surface
@@ -33,6 +28,11 @@
import androidx.ui.test.captureToBitmap
import androidx.ui.test.createComposeRule
import androidx.ui.test.findByTag
+import androidx.ui.unit.Dp
+import androidx.ui.unit.IntPxSize
+import androidx.ui.unit.dp
+import androidx.ui.unit.ipx
+import androidx.ui.unit.withDensity
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
diff --git a/ui/ui-material/src/androidTest/java/androidx/ui/material/FloatingActionButtonUiTest.kt b/ui/ui-material/src/androidTest/java/androidx/ui/material/FloatingActionButtonUiTest.kt
index b6e0bbd..2155187 100644
--- a/ui/ui-material/src/androidTest/java/androidx/ui/material/FloatingActionButtonUiTest.kt
+++ b/ui/ui-material/src/androidTest/java/androidx/ui/material/FloatingActionButtonUiTest.kt
@@ -17,12 +17,12 @@
package androidx.ui.material
import androidx.test.filters.MediumTest
-import androidx.ui.core.dp
-import androidx.ui.core.round
-import androidx.ui.core.withDensity
import androidx.ui.graphics.Image
import androidx.ui.graphics.ImageConfig
import androidx.ui.test.createComposeRule
+import androidx.ui.unit.dp
+import androidx.ui.unit.round
+import androidx.ui.unit.withDensity
import com.google.common.truth.Truth.assertThat
import org.junit.Rule
import org.junit.Test
diff --git a/ui/ui-material/src/androidTest/java/androidx/ui/material/ListItemTest.kt b/ui/ui-material/src/androidTest/java/androidx/ui/material/ListItemTest.kt
index c0bc423..0f6f6621 100644
--- a/ui/ui-material/src/androidTest/java/androidx/ui/material/ListItemTest.kt
+++ b/ui/ui-material/src/androidTest/java/androidx/ui/material/ListItemTest.kt
@@ -19,23 +19,23 @@
import androidx.compose.Composable
import androidx.test.filters.SmallTest
import androidx.ui.core.Alignment
-import androidx.ui.core.Dp
import androidx.ui.core.FirstBaseline
import androidx.ui.core.OnChildPositioned
-import androidx.ui.core.Px
-import androidx.ui.core.PxPosition
-import androidx.ui.core.PxSize
import androidx.ui.core.Ref
import androidx.ui.core.Text
-import androidx.ui.core.dp
-import androidx.ui.core.ipx
-import androidx.ui.core.px
-import androidx.ui.core.round
-import androidx.ui.core.toPx
import androidx.ui.foundation.SimpleImage
import androidx.ui.graphics.Image
import androidx.ui.layout.Container
import androidx.ui.test.createComposeRule
+import androidx.ui.unit.Dp
+import androidx.ui.unit.Px
+import androidx.ui.unit.PxPosition
+import androidx.ui.unit.PxSize
+import androidx.ui.unit.dp
+import androidx.ui.unit.ipx
+import androidx.ui.unit.px
+import androidx.ui.unit.round
+import androidx.ui.unit.toPx
import com.google.common.truth.Truth.assertThat
import org.junit.Rule
import org.junit.Test
diff --git a/ui/ui-material/src/androidTest/java/androidx/ui/material/MaterialTest.kt b/ui/ui-material/src/androidTest/java/androidx/ui/material/MaterialTest.kt
index 7e859ae..b073e8e 100644
--- a/ui/ui-material/src/androidTest/java/androidx/ui/material/MaterialTest.kt
+++ b/ui/ui-material/src/androidTest/java/androidx/ui/material/MaterialTest.kt
@@ -17,14 +17,14 @@
package androidx.ui.material
import androidx.compose.Composable
-import androidx.ui.core.DensityScope
-import androidx.ui.core.PxSize
-import androidx.ui.test.BigTestConstraints
-import androidx.ui.test.CollectedSizes
-import androidx.ui.test.setContentAndGetPixelSize
import androidx.ui.layout.DpConstraints
import androidx.ui.material.surface.Surface
+import androidx.ui.test.BigTestConstraints
+import androidx.ui.test.CollectedSizes
import androidx.ui.test.ComposeTestRule
+import androidx.ui.test.setContentAndGetPixelSize
+import androidx.ui.unit.DensityScope
+import androidx.ui.unit.PxSize
fun ComposeTestRule.setMaterialContent(composable: @Composable() () -> Unit) {
setContent {
diff --git a/ui/ui-material/src/androidTest/java/androidx/ui/material/ProgressIndicatorTest.kt b/ui/ui-material/src/androidTest/java/androidx/ui/material/ProgressIndicatorTest.kt
index 2553c18..42c714a 100644
--- a/ui/ui-material/src/androidTest/java/androidx/ui/material/ProgressIndicatorTest.kt
+++ b/ui/ui-material/src/androidTest/java/androidx/ui/material/ProgressIndicatorTest.kt
@@ -18,11 +18,11 @@
import androidx.compose.Model
import androidx.test.filters.LargeTest
import androidx.ui.core.TestTag
-import androidx.ui.core.dp
import androidx.ui.test.assertIsVisible
import androidx.ui.test.assertValueEquals
import androidx.ui.test.createComposeRule
import androidx.ui.test.findByTag
+import androidx.ui.unit.dp
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
diff --git a/ui/ui-material/src/androidTest/java/androidx/ui/material/RadioGroupUiTest.kt b/ui/ui-material/src/androidTest/java/androidx/ui/material/RadioGroupUiTest.kt
index 9557046..490acd8 100644
--- a/ui/ui-material/src/androidTest/java/androidx/ui/material/RadioGroupUiTest.kt
+++ b/ui/ui-material/src/androidTest/java/androidx/ui/material/RadioGroupUiTest.kt
@@ -20,19 +20,19 @@
import androidx.compose.Model
import androidx.test.filters.MediumTest
import androidx.ui.core.TestTag
-import androidx.ui.core.dp
import androidx.ui.foundation.Strings
import androidx.ui.layout.Column
import androidx.ui.semantics.accessibilityValue
import androidx.ui.test.assertIsInMutuallyExclusiveGroup
import androidx.ui.test.assertIsSelected
+import androidx.ui.test.assertIsUnselected
import androidx.ui.test.assertSemanticsIsEqualTo
import androidx.ui.test.copyWith
import androidx.ui.test.createComposeRule
import androidx.ui.test.createFullSemantics
import androidx.ui.test.doClick
import androidx.ui.test.findByTag
-import androidx.ui.test.assertIsUnselected
+import androidx.ui.unit.dp
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
diff --git a/ui/ui-material/src/androidTest/java/androidx/ui/material/RippleEffectTest.kt b/ui/ui-material/src/androidTest/java/androidx/ui/material/RippleEffectTest.kt
index b3ad200..4104a03 100644
--- a/ui/ui-material/src/androidTest/java/androidx/ui/material/RippleEffectTest.kt
+++ b/ui/ui-material/src/androidTest/java/androidx/ui/material/RippleEffectTest.kt
@@ -18,12 +18,8 @@
import androidx.compose.Composable
import androidx.compose.Model
import androidx.test.filters.MediumTest
-import androidx.ui.core.Density
-import androidx.ui.core.Dp
import androidx.ui.core.LayoutCoordinates
-import androidx.ui.core.PxPosition
import androidx.ui.core.TestTag
-import androidx.ui.core.dp
import androidx.ui.foundation.Clickable
import androidx.ui.graphics.Canvas
import androidx.ui.graphics.Color
@@ -40,6 +36,10 @@
import androidx.ui.test.createComposeRule
import androidx.ui.test.doClick
import androidx.ui.test.findByTag
+import androidx.ui.unit.Density
+import androidx.ui.unit.Dp
+import androidx.ui.unit.PxPosition
+import androidx.ui.unit.dp
import org.junit.Assert.assertEquals
import org.junit.Assert.assertFalse
import org.junit.Assert.assertTrue
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 e86771d..707810d 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
@@ -19,17 +19,16 @@
import androidx.compose.FrameManager.framed
import androidx.test.filters.MediumTest
import androidx.ui.core.TestTag
-import androidx.ui.core.dp
import androidx.ui.layout.DpConstraints
import androidx.ui.test.assertIsVisible
import androidx.ui.test.assertValueEquals
import androidx.ui.test.createComposeRule
import androidx.ui.test.findByTag
+import androidx.ui.unit.dp
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
-import java.lang.IllegalArgumentException
@MediumTest
@RunWith(JUnit4::class)
diff --git a/ui/ui-material/src/androidTest/java/androidx/ui/material/SnackbarTest.kt b/ui/ui-material/src/androidTest/java/androidx/ui/material/SnackbarTest.kt
index b19d584..f235524 100644
--- a/ui/ui-material/src/androidTest/java/androidx/ui/material/SnackbarTest.kt
+++ b/ui/ui-material/src/androidTest/java/androidx/ui/material/SnackbarTest.kt
@@ -18,22 +18,22 @@
import androidx.test.filters.MediumTest
import androidx.ui.core.FirstBaseline
-import androidx.ui.core.IntPx
import androidx.ui.core.LastBaseline
import androidx.ui.core.LayoutCoordinates
import androidx.ui.core.OnChildPositioned
-import androidx.ui.core.PxPosition
import androidx.ui.core.Text
-import androidx.ui.core.dp
import androidx.ui.core.globalPosition
-import androidx.ui.core.round
-import androidx.ui.core.withDensity
import androidx.ui.layout.DpConstraints
import androidx.ui.layout.Wrap
import androidx.ui.test.assertIsVisible
import androidx.ui.test.createComposeRule
import androidx.ui.test.doClick
import androidx.ui.test.findByText
+import androidx.ui.unit.IntPx
+import androidx.ui.unit.PxPosition
+import androidx.ui.unit.dp
+import androidx.ui.unit.round
+import androidx.ui.unit.withDensity
import com.google.common.truth.Truth.assertThat
import org.junit.Rule
import org.junit.Test
diff --git a/ui/ui-material/src/androidTest/java/androidx/ui/material/SwitchUiTest.kt b/ui/ui-material/src/androidTest/java/androidx/ui/material/SwitchUiTest.kt
index b9ac793..39922c8 100644
--- a/ui/ui-material/src/androidTest/java/androidx/ui/material/SwitchUiTest.kt
+++ b/ui/ui-material/src/androidTest/java/androidx/ui/material/SwitchUiTest.kt
@@ -19,21 +19,21 @@
import androidx.compose.state
import androidx.test.filters.MediumTest
import androidx.ui.core.TestTag
-import androidx.ui.core.dp
import androidx.ui.foundation.Strings
import androidx.ui.foundation.selection.ToggleableState
import androidx.ui.foundation.semantics.toggleableState
import androidx.ui.layout.Column
import androidx.ui.semantics.accessibilityValue
import androidx.ui.test.assertHasNoClickAction
-import androidx.ui.test.assertIsOn
import androidx.ui.test.assertIsOff
+import androidx.ui.test.assertIsOn
import androidx.ui.test.assertSemanticsIsEqualTo
import androidx.ui.test.copyWith
import androidx.ui.test.createComposeRule
import androidx.ui.test.createFullSemantics
import androidx.ui.test.doClick
import androidx.ui.test.findByTag
+import androidx.ui.unit.dp
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
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 7339406..7ea9408 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
@@ -21,25 +21,25 @@
import androidx.ui.core.Alignment
import androidx.ui.core.LayoutCoordinates
import androidx.ui.core.OnChildPositioned
-import androidx.ui.core.PxPosition
-import androidx.ui.core.dp
-import androidx.ui.core.toPx
-import androidx.ui.core.withDensity
import androidx.ui.foundation.ColoredRect
import androidx.ui.graphics.Color
+import androidx.ui.graphics.Image
+import androidx.ui.graphics.ImageConfig
import androidx.ui.layout.Container
import androidx.ui.material.samples.ScrollingTextTabs
import androidx.ui.material.samples.TextTabs
import androidx.ui.material.surface.Surface
-import androidx.ui.graphics.Image
-import androidx.ui.graphics.ImageConfig
import androidx.ui.test.assertCountEquals
-import androidx.ui.test.assertIsUnselected
import androidx.ui.test.assertIsSelected
+import androidx.ui.test.assertIsUnselected
import androidx.ui.test.createComposeRule
import androidx.ui.test.doClick
import androidx.ui.test.findAll
import androidx.ui.test.isInMutuallyExclusiveGroup
+import androidx.ui.unit.PxPosition
+import androidx.ui.unit.dp
+import androidx.ui.unit.toPx
+import androidx.ui.unit.withDensity
import com.google.common.truth.Truth.assertThat
import org.junit.Rule
import org.junit.Test