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
diff --git a/ui/ui-material/src/main/java/androidx/ui/material/AlertDialog.kt b/ui/ui-material/src/main/java/androidx/ui/material/AlertDialog.kt
index 71919bf..d5e2cf9 100644
--- a/ui/ui-material/src/main/java/androidx/ui/material/AlertDialog.kt
+++ b/ui/ui-material/src/main/java/androidx/ui/material/AlertDialog.kt
@@ -19,7 +19,6 @@
import androidx.compose.Composable
import androidx.ui.core.Alignment
import androidx.ui.core.CurrentTextStyleProvider
-import androidx.ui.core.dp
import androidx.ui.foundation.Dialog
import androidx.ui.foundation.shape.corner.RoundedCornerShape
import androidx.ui.layout.Arrangement
@@ -27,12 +26,13 @@
import androidx.ui.layout.Container
import androidx.ui.layout.EdgeInsets
import androidx.ui.layout.LayoutHeight
-import androidx.ui.layout.Spacer
-import androidx.ui.layout.Row
import androidx.ui.layout.LayoutWidth
+import androidx.ui.layout.Row
+import androidx.ui.layout.Spacer
import androidx.ui.material.AlertDialogButtonLayout.SideBySide
import androidx.ui.material.AlertDialogButtonLayout.Stacked
import androidx.ui.material.surface.Surface
+import androidx.ui.unit.dp
/**
* Alert dialog is a [Dialog] which interrupts the user with urgent information, details or actions.
diff --git a/ui/ui-material/src/main/java/androidx/ui/material/AppBar.kt b/ui/ui-material/src/main/java/androidx/ui/material/AppBar.kt
index 8a779c1..06e0c5c 100644
--- a/ui/ui-material/src/main/java/androidx/ui/material/AppBar.kt
+++ b/ui/ui-material/src/main/java/androidx/ui/material/AppBar.kt
@@ -19,53 +19,53 @@
import androidx.compose.state
import androidx.ui.core.Alignment
import androidx.ui.core.CurrentTextStyleProvider
-import androidx.ui.core.Density
-import androidx.ui.core.Dp
-import androidx.ui.core.IntPx
-import androidx.ui.core.IntPxSize
import androidx.ui.core.LastBaseline
import androidx.ui.core.Layout
import androidx.ui.core.LayoutTagParentData
import androidx.ui.core.OnChildPositioned
import androidx.ui.core.ParentData
-import androidx.ui.core.PxPosition
-import androidx.ui.core.PxSize
import androidx.ui.core.Text
import androidx.ui.core.ambientDensity
-import androidx.ui.core.dp
-import androidx.ui.core.sp
import androidx.ui.core.tag
-import androidx.ui.core.withDensity
-import androidx.ui.engine.geometry.Offset
-import androidx.ui.engine.geometry.Outline
-import androidx.ui.engine.geometry.Rect
-import androidx.ui.engine.geometry.Shape
-import androidx.ui.engine.geometry.addOutline
import androidx.ui.foundation.Clickable
import androidx.ui.foundation.SimpleImage
import androidx.ui.foundation.shape.RectangleShape
import androidx.ui.foundation.shape.corner.CircleShape
+import androidx.ui.geometry.Offset
+import androidx.ui.geometry.Rect
+import androidx.ui.graphics.Color
+import androidx.ui.graphics.Image
+import androidx.ui.graphics.Outline
+import androidx.ui.graphics.Path
+import androidx.ui.graphics.PathOperation
+import androidx.ui.graphics.Shape
+import androidx.ui.graphics.addOutline
+import androidx.ui.layout.AlignmentLineOffset
+import androidx.ui.layout.Arrangement
import androidx.ui.layout.Container
+import androidx.ui.layout.EdgeInsets
+import androidx.ui.layout.LayoutAlign
+import androidx.ui.layout.LayoutHeight
+import androidx.ui.layout.LayoutSize
+import androidx.ui.layout.LayoutWidth
+import androidx.ui.layout.Padding
import androidx.ui.layout.Row
import androidx.ui.layout.Spacer
-import androidx.ui.layout.LayoutWidth
-import androidx.ui.material.surface.Surface
-import androidx.ui.graphics.Color
-import androidx.ui.layout.EdgeInsets
import androidx.ui.layout.Wrap
import androidx.ui.material.BottomAppBar.FabConfiguration
import androidx.ui.material.BottomAppBar.FabPosition
import androidx.ui.material.ripple.Ripple
-import androidx.ui.graphics.Image
-import androidx.ui.graphics.Path
-import androidx.ui.graphics.PathOperation
-import androidx.ui.layout.AlignmentLineOffset
-import androidx.ui.layout.Arrangement
-import androidx.ui.layout.LayoutAlign
-import androidx.ui.layout.LayoutHeight
-import androidx.ui.layout.LayoutSize
-import androidx.ui.layout.Padding
+import androidx.ui.material.surface.Surface
import androidx.ui.text.TextStyle
+import androidx.ui.unit.Density
+import androidx.ui.unit.Dp
+import androidx.ui.unit.IntPx
+import androidx.ui.unit.IntPxSize
+import androidx.ui.unit.PxPosition
+import androidx.ui.unit.PxSize
+import androidx.ui.unit.dp
+import androidx.ui.unit.sp
+import androidx.ui.unit.withDensity
import kotlin.math.sqrt
/**
diff --git a/ui/ui-material/src/main/java/androidx/ui/material/Button.kt b/ui/ui-material/src/main/java/androidx/ui/material/Button.kt
index 343e4bd..5881c7c 100644
--- a/ui/ui-material/src/main/java/androidx/ui/material/Button.kt
+++ b/ui/ui-material/src/main/java/androidx/ui/material/Button.kt
@@ -20,19 +20,19 @@
import androidx.compose.Composable
import androidx.compose.Immutable
import androidx.ui.core.CurrentTextStyleProvider
-import androidx.ui.core.Dp
import androidx.ui.core.Modifier
import androidx.ui.core.Text
-import androidx.ui.core.dp
-import androidx.ui.engine.geometry.Shape
import androidx.ui.foundation.Clickable
import androidx.ui.foundation.shape.border.Border
import androidx.ui.graphics.Color
+import androidx.ui.graphics.Shape
import androidx.ui.layout.Container
import androidx.ui.layout.DpConstraints
import androidx.ui.layout.EdgeInsets
import androidx.ui.material.ripple.Ripple
import androidx.ui.material.surface.Surface
+import androidx.ui.unit.Dp
+import androidx.ui.unit.dp
/**
* Styling configuration for a [Button].
diff --git a/ui/ui-material/src/main/java/androidx/ui/material/Checkbox.kt b/ui/ui-material/src/main/java/androidx/ui/material/Checkbox.kt
index c16cb6b9..e3f4204 100644
--- a/ui/ui-material/src/main/java/androidx/ui/material/Checkbox.kt
+++ b/ui/ui-material/src/main/java/androidx/ui/material/Checkbox.kt
@@ -25,21 +25,21 @@
import androidx.ui.animation.Transition
import androidx.ui.core.Draw
import androidx.ui.core.Modifier
-import androidx.ui.core.dp
-import androidx.ui.engine.geometry.Offset
-import androidx.ui.engine.geometry.RRect
-import androidx.ui.engine.geometry.Radius
-import androidx.ui.engine.geometry.shrink
-import androidx.ui.engine.geometry.withRadius
import androidx.ui.foundation.selection.ToggleableState
import androidx.ui.foundation.selection.TriStateToggleable
+import androidx.ui.geometry.Offset
+import androidx.ui.geometry.RRect
+import androidx.ui.geometry.Radius
+import androidx.ui.geometry.shrink
+import androidx.ui.geometry.withRadius
import androidx.ui.graphics.Color
-import androidx.ui.layout.Container
-import androidx.ui.layout.Padding
-import androidx.ui.material.ripple.Ripple
import androidx.ui.graphics.Paint
import androidx.ui.graphics.PaintingStyle
import androidx.ui.graphics.StrokeCap
+import androidx.ui.layout.Container
+import androidx.ui.layout.Padding
+import androidx.ui.material.ripple.Ripple
+import androidx.ui.unit.dp
/**
* A component that represents two states (checked / unchecked).
diff --git a/ui/ui-material/src/main/java/androidx/ui/material/DataTable.kt b/ui/ui-material/src/main/java/androidx/ui/material/DataTable.kt
index d4c846d..55471c3 100644
--- a/ui/ui-material/src/main/java/androidx/ui/material/DataTable.kt
+++ b/ui/ui-material/src/main/java/androidx/ui/material/DataTable.kt
@@ -21,12 +21,9 @@
import androidx.ui.core.Alignment
import androidx.ui.core.Constraints
import androidx.ui.core.CurrentTextStyleProvider
-import androidx.ui.core.Dp
-import androidx.ui.core.IntPx
import androidx.ui.core.Layout
import androidx.ui.core.ParentData
import androidx.ui.core.Text
-import androidx.ui.core.dp
import androidx.ui.foundation.Clickable
import androidx.ui.foundation.ColoredRect
import androidx.ui.foundation.SimpleImage
@@ -41,14 +38,17 @@
import androidx.ui.layout.EdgeInsets
import androidx.ui.layout.LayoutGravity
import androidx.ui.layout.LayoutSize
+import androidx.ui.layout.LayoutWidth
import androidx.ui.layout.Row
+import androidx.ui.layout.Spacer
import androidx.ui.layout.Table
import androidx.ui.layout.TableColumnWidth
-import androidx.ui.layout.Spacer
-import androidx.ui.layout.LayoutWidth
import androidx.ui.material.ripple.Ripple
import androidx.ui.text.TextStyle
import androidx.ui.text.font.FontWeight
+import androidx.ui.unit.Dp
+import androidx.ui.unit.IntPx
+import androidx.ui.unit.dp
/**
* Pagination configuration for a [DataTable].
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 6e186e9..b0843da 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
@@ -17,12 +17,12 @@
package androidx.ui.material
import androidx.compose.Composable
-import androidx.ui.core.Dp
import androidx.ui.core.Modifier
-import androidx.ui.core.dp
import androidx.ui.foundation.ColoredRect
import androidx.ui.graphics.Color
import androidx.ui.layout.LayoutPadding
+import androidx.ui.unit.Dp
+import androidx.ui.unit.dp
/**
* A divider is a thin line that groups content in lists and layouts
diff --git a/ui/ui-material/src/main/java/androidx/ui/material/Drawer.kt b/ui/ui-material/src/main/java/androidx/ui/material/Drawer.kt
index fc641fe..d780b5c 100644
--- a/ui/ui-material/src/main/java/androidx/ui/material/Drawer.kt
+++ b/ui/ui-material/src/main/java/androidx/ui/material/Drawer.kt
@@ -20,19 +20,12 @@
import androidx.compose.Composable
import androidx.compose.remember
import androidx.ui.core.Draw
-import androidx.ui.core.IntPx
import androidx.ui.core.Layout
-import androidx.ui.core.Px
import androidx.ui.core.RepaintBoundary
import androidx.ui.core.WithConstraints
import androidx.ui.core.ambientDensity
-import androidx.ui.core.dp
import androidx.ui.core.hasBoundedHeight
import androidx.ui.core.hasBoundedWidth
-import androidx.ui.core.min
-import androidx.ui.core.px
-import androidx.ui.core.toRect
-import androidx.ui.core.withDensity
import androidx.ui.foundation.Clickable
import androidx.ui.foundation.ValueHolder
import androidx.ui.foundation.gestures.DragDirection
@@ -42,9 +35,16 @@
import androidx.ui.layout.DpConstraints
import androidx.ui.layout.EdgeInsets
import androidx.ui.layout.Stack
-import androidx.ui.lerp
import androidx.ui.material.internal.StateDraggable
import androidx.ui.material.surface.Surface
+import androidx.ui.unit.IntPx
+import androidx.ui.unit.Px
+import androidx.ui.unit.dp
+import androidx.ui.unit.min
+import androidx.ui.unit.px
+import androidx.ui.unit.toRect
+import androidx.ui.unit.withDensity
+import androidx.ui.util.lerp
/**
* Possible states of the drawer
diff --git a/ui/ui-material/src/main/java/androidx/ui/material/FloatingActionButton.kt b/ui/ui-material/src/main/java/androidx/ui/material/FloatingActionButton.kt
index 11e13c8..3cc0443 100644
--- a/ui/ui-material/src/main/java/androidx/ui/material/FloatingActionButton.kt
+++ b/ui/ui-material/src/main/java/androidx/ui/material/FloatingActionButton.kt
@@ -18,25 +18,25 @@
import androidx.compose.Composable
import androidx.ui.core.CurrentTextStyleProvider
-import androidx.ui.core.Dp
import androidx.ui.core.Modifier
import androidx.ui.core.Text
-import androidx.ui.core.dp
-import androidx.ui.engine.geometry.Shape
import androidx.ui.foundation.Clickable
import androidx.ui.foundation.SimpleImage
import androidx.ui.foundation.shape.corner.CircleShape
import androidx.ui.graphics.Color
+import androidx.ui.graphics.Image
+import androidx.ui.graphics.Shape
import androidx.ui.layout.Container
import androidx.ui.layout.DpConstraints
+import androidx.ui.layout.LayoutWidth
import androidx.ui.layout.Padding
import androidx.ui.layout.Row
import androidx.ui.layout.Spacer
-import androidx.ui.layout.LayoutWidth
-import androidx.ui.graphics.Image
import androidx.ui.material.ripple.Ripple
import androidx.ui.material.surface.Surface
import androidx.ui.text.TextStyle
+import androidx.ui.unit.Dp
+import androidx.ui.unit.dp
/**
* A floating action button (FAB) is a [Button] to represents the primary action of a screen.
diff --git a/ui/ui-material/src/main/java/androidx/ui/material/ListItem.kt b/ui/ui-material/src/main/java/androidx/ui/material/ListItem.kt
index 9c00eb7..1986d22 100644
--- a/ui/ui-material/src/main/java/androidx/ui/material/ListItem.kt
+++ b/ui/ui-material/src/main/java/androidx/ui/material/ListItem.kt
@@ -19,17 +19,11 @@
import androidx.compose.Composable
import androidx.ui.core.Alignment
import androidx.ui.core.CurrentTextStyleProvider
-import androidx.ui.core.Dp
import androidx.ui.core.FirstBaseline
-import androidx.ui.core.IntPx
-import androidx.ui.core.IntPxSize
import androidx.ui.core.LastBaseline
import androidx.ui.core.Layout
import androidx.ui.core.Modifier
import androidx.ui.core.Text
-import androidx.ui.core.dp
-import androidx.ui.core.ipx
-import androidx.ui.core.max
import androidx.ui.foundation.Clickable
import androidx.ui.foundation.SimpleImage
import androidx.ui.graphics.Color
@@ -45,6 +39,12 @@
import androidx.ui.material.ripple.Ripple
import androidx.ui.text.TextStyle
import androidx.ui.text.style.TextOverflow
+import androidx.ui.unit.Dp
+import androidx.ui.unit.IntPx
+import androidx.ui.unit.IntPxSize
+import androidx.ui.unit.dp
+import androidx.ui.unit.ipx
+import androidx.ui.unit.max
/**
* Material Design implementation of [list items](https://material.io/components/lists).
diff --git a/ui/ui-material/src/main/java/androidx/ui/material/ProgressIndicator.kt b/ui/ui-material/src/main/java/androidx/ui/material/ProgressIndicator.kt
index 27c112d..a1740c1 100644
--- a/ui/ui-material/src/main/java/androidx/ui/material/ProgressIndicator.kt
+++ b/ui/ui-material/src/main/java/androidx/ui/material/ProgressIndicator.kt
@@ -27,21 +27,21 @@
import androidx.compose.remember
import androidx.ui.animation.Transition
import androidx.ui.core.Draw
-import androidx.ui.core.PxSize
import androidx.ui.core.ambientDensity
-import androidx.ui.core.dp
-import androidx.ui.core.withDensity
-import androidx.ui.engine.geometry.Offset
-import androidx.ui.engine.geometry.Rect
import androidx.ui.foundation.DeterminateProgressIndicator
-import androidx.ui.graphics.Color
-import androidx.ui.layout.Container
-import androidx.ui.layout.Padding
-import androidx.ui.layout.Wrap
+import androidx.ui.geometry.Offset
+import androidx.ui.geometry.Rect
import androidx.ui.graphics.Canvas
+import androidx.ui.graphics.Color
import androidx.ui.graphics.Paint
import androidx.ui.graphics.PaintingStyle
import androidx.ui.graphics.StrokeCap
+import androidx.ui.layout.Container
+import androidx.ui.layout.Padding
+import androidx.ui.layout.Wrap
+import androidx.ui.unit.PxSize
+import androidx.ui.unit.dp
+import androidx.ui.unit.withDensity
import androidx.ui.vectormath64.degrees
import kotlin.math.abs
import kotlin.math.max
diff --git a/ui/ui-material/src/main/java/androidx/ui/material/RadioButton.kt b/ui/ui-material/src/main/java/androidx/ui/material/RadioButton.kt
index 63ca7c4..80b06ac 100644
--- a/ui/ui-material/src/main/java/androidx/ui/material/RadioButton.kt
+++ b/ui/ui-material/src/main/java/androidx/ui/material/RadioButton.kt
@@ -22,30 +22,30 @@
import androidx.ui.animation.ColorPropKey
import androidx.ui.animation.DpPropKey
import androidx.ui.animation.Transition
-import androidx.ui.core.DensityScope
-import androidx.ui.core.Dp
import androidx.ui.core.Draw
-import androidx.ui.core.PxSize
import androidx.ui.core.Text
-import androidx.ui.core.dp
-import androidx.ui.engine.geometry.Offset
-import androidx.ui.engine.geometry.RRect
-import androidx.ui.engine.geometry.Radius
-import androidx.ui.engine.geometry.shift
-import androidx.ui.engine.geometry.shrink
import androidx.ui.foundation.selection.MutuallyExclusiveSetItem
+import androidx.ui.geometry.Offset
+import androidx.ui.geometry.RRect
+import androidx.ui.geometry.Radius
+import androidx.ui.geometry.shift
+import androidx.ui.geometry.shrink
+import androidx.ui.graphics.Canvas
import androidx.ui.graphics.Color
+import androidx.ui.graphics.Paint
+import androidx.ui.graphics.PaintingStyle
import androidx.ui.layout.Column
import androidx.ui.layout.Container
+import androidx.ui.layout.LayoutWidth
import androidx.ui.layout.Padding
import androidx.ui.layout.Row
import androidx.ui.layout.Wrap
import androidx.ui.material.ripple.Ripple
-import androidx.ui.graphics.Canvas
-import androidx.ui.graphics.Paint
-import androidx.ui.graphics.PaintingStyle
-import androidx.ui.layout.LayoutWidth
import androidx.ui.text.TextStyle
+import androidx.ui.unit.DensityScope
+import androidx.ui.unit.Dp
+import androidx.ui.unit.PxSize
+import androidx.ui.unit.dp
/**
* Components for creating mutually exclusive set of [RadioButton]s.
diff --git a/ui/ui-material/src/main/java/androidx/ui/material/Shape.kt b/ui/ui-material/src/main/java/androidx/ui/material/Shape.kt
index e9c00cf..c712f65 100644
--- a/ui/ui-material/src/main/java/androidx/ui/material/Shape.kt
+++ b/ui/ui-material/src/main/java/androidx/ui/material/Shape.kt
@@ -17,10 +17,10 @@
package androidx.ui.material
import androidx.compose.Ambient
-import androidx.ui.core.dp
-import androidx.ui.engine.geometry.Shape
import androidx.ui.foundation.shape.RectangleShape
import androidx.ui.foundation.shape.corner.RoundedCornerShape
+import androidx.ui.graphics.Shape
+import androidx.ui.unit.dp
/**
* Data class holding current shapes for common surfaces like Button or Card.
diff --git a/ui/ui-material/src/main/java/androidx/ui/material/Slider.kt b/ui/ui-material/src/main/java/androidx/ui/material/Slider.kt
index 712e8c9..65cc5fc 100644
--- a/ui/ui-material/src/main/java/androidx/ui/material/Slider.kt
+++ b/ui/ui-material/src/main/java/androidx/ui/material/Slider.kt
@@ -26,20 +26,15 @@
import androidx.ui.core.Alignment
import androidx.ui.core.Draw
import androidx.ui.core.Modifier
-import androidx.ui.core.PxSize
import androidx.ui.core.WithConstraints
import androidx.ui.core.ambientDensity
-import androidx.ui.core.dp
import androidx.ui.core.gesture.PressGestureDetector
-import androidx.ui.core.px
-import androidx.ui.core.toRect
-import androidx.ui.core.withDensity
-import androidx.ui.engine.geometry.Offset
import androidx.ui.foundation.animation.AnimatedValueHolder
import androidx.ui.foundation.animation.FlingConfig
import androidx.ui.foundation.gestures.DragDirection
import androidx.ui.foundation.gestures.Draggable
import androidx.ui.foundation.shape.corner.CircleShape
+import androidx.ui.geometry.Offset
import androidx.ui.graphics.Canvas
import androidx.ui.graphics.Color
import androidx.ui.graphics.Paint
@@ -48,14 +43,19 @@
import androidx.ui.graphics.StrokeCap
import androidx.ui.layout.Container
import androidx.ui.layout.DpConstraints
-import androidx.ui.layout.Padding
import androidx.ui.layout.LayoutSize
+import androidx.ui.layout.Padding
import androidx.ui.layout.Spacer
-import androidx.ui.lerp
import androidx.ui.material.ripple.Ripple
import androidx.ui.material.surface.Surface
import androidx.ui.semantics.Semantics
import androidx.ui.semantics.accessibilityValue
+import androidx.ui.unit.PxSize
+import androidx.ui.unit.dp
+import androidx.ui.unit.px
+import androidx.ui.unit.toRect
+import androidx.ui.unit.withDensity
+import androidx.ui.util.lerp
import kotlin.math.abs
/**
@@ -102,7 +102,13 @@
startPx = min
endPx = max
holder.setBounds(min, max)
- anchorsPx = tickFractions.map { lerp(startPx, endPx, it) }
+ anchorsPx = tickFractions.map {
+ lerp(
+ startPx,
+ endPx,
+ it
+ )
+ }
holder.animatedFloat.snapTo(newValue)
}
diff --git a/ui/ui-material/src/main/java/androidx/ui/material/Snackbar.kt b/ui/ui-material/src/main/java/androidx/ui/material/Snackbar.kt
index 56084b2..df614f0 100644
--- a/ui/ui-material/src/main/java/androidx/ui/material/Snackbar.kt
+++ b/ui/ui-material/src/main/java/androidx/ui/material/Snackbar.kt
@@ -19,17 +19,12 @@
import androidx.compose.Composable
import androidx.ui.core.CurrentTextStyleProvider
import androidx.ui.core.FirstBaseline
-import androidx.ui.core.IntPx
import androidx.ui.core.LastBaseline
import androidx.ui.core.Layout
import androidx.ui.core.LayoutTagParentData
import androidx.ui.core.Modifier
import androidx.ui.core.ParentData
import androidx.ui.core.Text
-import androidx.ui.core.coerceAtLeast
-import androidx.ui.core.dp
-import androidx.ui.core.ipx
-import androidx.ui.core.max
import androidx.ui.core.tag
import androidx.ui.foundation.shape.DrawShape
import androidx.ui.foundation.shape.corner.RoundedCornerShape
@@ -41,6 +36,10 @@
import androidx.ui.layout.LayoutPadding
import androidx.ui.layout.LayoutWidth
import androidx.ui.material.surface.Surface
+import androidx.ui.unit.IntPx
+import androidx.ui.unit.dp
+import androidx.ui.unit.ipx
+import androidx.ui.unit.max
/**
* Snackbars provide brief messages about app processes at the bottom of the screen.
diff --git a/ui/ui-material/src/main/java/androidx/ui/material/Switch.kt b/ui/ui-material/src/main/java/androidx/ui/material/Switch.kt
index 2f33347..6afcf9a 100644
--- a/ui/ui-material/src/main/java/androidx/ui/material/Switch.kt
+++ b/ui/ui-material/src/main/java/androidx/ui/material/Switch.kt
@@ -18,17 +18,12 @@
import androidx.animation.TweenBuilder
import androidx.compose.Composable
-import androidx.ui.core.DensityScope
import androidx.ui.core.Draw
-import androidx.ui.core.PxSize
import androidx.ui.core.ambientDensity
import androidx.ui.foundation.ValueHolder
-import androidx.ui.core.dp
-import androidx.ui.core.px
-import androidx.ui.core.withDensity
-import androidx.ui.engine.geometry.Offset
import androidx.ui.foundation.gestures.DragDirection
import androidx.ui.foundation.selection.Toggleable
+import androidx.ui.geometry.Offset
import androidx.ui.graphics.Canvas
import androidx.ui.graphics.Color
import androidx.ui.graphics.Paint
@@ -38,6 +33,11 @@
import androidx.ui.layout.Wrap
import androidx.ui.material.internal.StateDraggable
import androidx.ui.material.ripple.Ripple
+import androidx.ui.unit.DensityScope
+import androidx.ui.unit.PxSize
+import androidx.ui.unit.dp
+import androidx.ui.unit.px
+import androidx.ui.unit.withDensity
/**
* A Switch is a two state toggleable component that provides on/off like options
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 9c0012f..1908d00 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
@@ -27,7 +27,6 @@
import androidx.ui.animation.Transition
import androidx.ui.core.Alignment
import androidx.ui.core.FirstBaseline
-import androidx.ui.core.IntPx
import androidx.ui.core.LastBaseline
import androidx.ui.core.Layout
import androidx.ui.core.LayoutTag
@@ -35,16 +34,10 @@
import androidx.ui.core.Modifier
import androidx.ui.core.ParentData
import androidx.ui.core.Placeable
-import androidx.ui.core.Px
import androidx.ui.core.Text
import androidx.ui.core.WithConstraints
import androidx.ui.core.ambientDensity
-import androidx.ui.core.dp
-import androidx.ui.core.max
-import androidx.ui.core.sp
import androidx.ui.core.tag
-import androidx.ui.core.toPx
-import androidx.ui.core.withDensity
import androidx.ui.core.withTight
import androidx.ui.foundation.ColoredRect
import androidx.ui.foundation.HorizontalScroller
@@ -65,6 +58,13 @@
import androidx.ui.material.ripple.Ripple
import androidx.ui.material.surface.Surface
import androidx.ui.text.style.TextAlign
+import androidx.ui.unit.IntPx
+import androidx.ui.unit.Px
+import androidx.ui.unit.dp
+import androidx.ui.unit.max
+import androidx.ui.unit.sp
+import androidx.ui.unit.toPx
+import androidx.ui.unit.withDensity
/**
* A TabRow contains a row of [Tab]s, and displays an indicator underneath the currently
diff --git a/ui/ui-material/src/main/java/androidx/ui/material/Typography.kt b/ui/ui-material/src/main/java/androidx/ui/material/Typography.kt
index fc3a963..cf710c2 100644
--- a/ui/ui-material/src/main/java/androidx/ui/material/Typography.kt
+++ b/ui/ui-material/src/main/java/androidx/ui/material/Typography.kt
@@ -17,10 +17,10 @@
package androidx.ui.material
import androidx.compose.Ambient
-import androidx.ui.core.sp
import androidx.ui.text.TextStyle
import androidx.ui.text.font.FontFamily
import androidx.ui.text.font.FontWeight
+import androidx.ui.unit.sp
/**
* Data class holding typography definitions as defined by the [Material typography specification](https://material.io/design/typography/the-type-system.html#type-scale).
diff --git a/ui/ui-material/src/main/java/androidx/ui/material/ripple/DefaultRippleEffect.kt b/ui/ui-material/src/main/java/androidx/ui/material/ripple/DefaultRippleEffect.kt
index 3a6e216..92190e1 100644
--- a/ui/ui-material/src/main/java/androidx/ui/material/ripple/DefaultRippleEffect.kt
+++ b/ui/ui-material/src/main/java/androidx/ui/material/ripple/DefaultRippleEffect.kt
@@ -26,25 +26,25 @@
import androidx.animation.transitionDefinition
import androidx.ui.animation.PxPositionPropKey
import androidx.ui.animation.PxPropKey
-import androidx.ui.core.Density
-import androidx.ui.core.DensityScope
-import androidx.ui.core.Dp
import androidx.ui.core.LayoutCoordinates
-import androidx.ui.core.Px
-import androidx.ui.core.PxPosition
-import androidx.ui.core.PxSize
-import androidx.ui.core.center
-import androidx.ui.core.dp
-import androidx.ui.core.getDistance
-import androidx.ui.core.inMilliseconds
-import androidx.ui.core.max
-import androidx.ui.core.milliseconds
-import androidx.ui.core.toOffset
-import androidx.ui.core.toRect
-import androidx.ui.core.withDensity
import androidx.ui.graphics.Canvas
import androidx.ui.graphics.Color
import androidx.ui.graphics.Paint
+import androidx.ui.unit.Density
+import androidx.ui.unit.DensityScope
+import androidx.ui.unit.Dp
+import androidx.ui.unit.Px
+import androidx.ui.unit.PxPosition
+import androidx.ui.unit.PxSize
+import androidx.ui.unit.center
+import androidx.ui.unit.dp
+import androidx.ui.unit.getDistance
+import androidx.ui.unit.inMilliseconds
+import androidx.ui.unit.max
+import androidx.ui.unit.milliseconds
+import androidx.ui.unit.toOffset
+import androidx.ui.unit.toRect
+import androidx.ui.unit.withDensity
internal fun getRippleStartRadius(size: PxSize) =
max(size.width, size.height) * 0.3f
diff --git a/ui/ui-material/src/main/java/androidx/ui/material/ripple/Ripple.kt b/ui/ui-material/src/main/java/androidx/ui/material/ripple/Ripple.kt
index b00d71f..b751177 100644
--- a/ui/ui-material/src/main/java/androidx/ui/material/ripple/Ripple.kt
+++ b/ui/ui-material/src/main/java/androidx/ui/material/ripple/Ripple.kt
@@ -22,16 +22,16 @@
import androidx.compose.remember
import androidx.compose.onDispose
import androidx.ui.animation.transitionsEnabled
-import androidx.ui.core.Density
-import androidx.ui.core.Dp
+import androidx.ui.unit.Density
+import androidx.ui.unit.Dp
import androidx.ui.core.Draw
import androidx.ui.core.LayoutCoordinates
import androidx.ui.core.OnChildPositioned
-import androidx.ui.core.PxPosition
import androidx.ui.core.ambientDensity
-import androidx.ui.core.center
import androidx.ui.core.gesture.PressIndicatorGestureDetector
import androidx.ui.graphics.Color
+import androidx.ui.unit.PxPosition
+import androidx.ui.unit.center
/**
* Ripple is a visual indicator for a pressed state.
diff --git a/ui/ui-material/src/main/java/androidx/ui/material/ripple/RippleEffectFactory.kt b/ui/ui-material/src/main/java/androidx/ui/material/ripple/RippleEffectFactory.kt
index 9f2d7c9..fa565fa 100644
--- a/ui/ui-material/src/main/java/androidx/ui/material/ripple/RippleEffectFactory.kt
+++ b/ui/ui-material/src/main/java/androidx/ui/material/ripple/RippleEffectFactory.kt
@@ -16,10 +16,10 @@
package androidx.ui.material.ripple
-import androidx.ui.core.Density
-import androidx.ui.core.Dp
+import androidx.ui.unit.Density
+import androidx.ui.unit.Dp
import androidx.ui.core.LayoutCoordinates
-import androidx.ui.core.PxPosition
+import androidx.ui.unit.PxPosition
/**
* An encapsulation of an [RippleEffect] constructor used by [Ripple] and [RippleTheme].
diff --git a/ui/ui-material/src/main/java/androidx/ui/material/surface/Card.kt b/ui/ui-material/src/main/java/androidx/ui/material/surface/Card.kt
index 84c3b42..6fee059 100644
--- a/ui/ui-material/src/main/java/androidx/ui/material/surface/Card.kt
+++ b/ui/ui-material/src/main/java/androidx/ui/material/surface/Card.kt
@@ -17,14 +17,14 @@
package androidx.ui.material.surface
import androidx.compose.Composable
-import androidx.ui.core.Dp
import androidx.ui.core.Modifier
-import androidx.ui.core.dp
-import androidx.ui.engine.geometry.Shape
import androidx.ui.foundation.shape.border.Border
import androidx.ui.graphics.Color
+import androidx.ui.graphics.Shape
import androidx.ui.material.MaterialTheme
import androidx.ui.material.contentColorFor
+import androidx.ui.unit.Dp
+import androidx.ui.unit.dp
/**
* Cards are [Surface]s that display content and actions on a single topic.
diff --git a/ui/ui-material/src/main/java/androidx/ui/material/surface/Surface.kt b/ui/ui-material/src/main/java/androidx/ui/material/surface/Surface.kt
index cf14808..a28be42 100644
--- a/ui/ui-material/src/main/java/androidx/ui/material/surface/Surface.kt
+++ b/ui/ui-material/src/main/java/androidx/ui/material/surface/Surface.kt
@@ -19,25 +19,25 @@
import androidx.compose.Composable
import androidx.ui.core.Clip
import androidx.ui.core.CurrentTextStyleProvider
-import androidx.ui.core.Dp
import androidx.ui.core.DrawShadow
import androidx.ui.core.Layout
import androidx.ui.core.Modifier
import androidx.ui.core.Text
-import androidx.ui.core.dp
-import androidx.ui.core.ipx
-import androidx.ui.engine.geometry.Shape
import androidx.ui.foundation.ProvideContentColor
import androidx.ui.foundation.shape.DrawShape
import androidx.ui.foundation.shape.RectangleShape
import androidx.ui.foundation.shape.border.Border
import androidx.ui.foundation.shape.border.DrawBorder
import androidx.ui.graphics.Color
+import androidx.ui.graphics.Shape
import androidx.ui.graphics.compositeOver
import androidx.ui.material.ColorPalette
import androidx.ui.material.MaterialTheme
import androidx.ui.material.contentColorFor
import androidx.ui.text.TextStyle
+import androidx.ui.unit.Dp
+import androidx.ui.unit.dp
+import androidx.ui.unit.ipx
import kotlin.math.ln
/**
diff --git a/ui/ui-material/src/test/java/androidx/ui/material/ripple/DefaultRippleEffectTest.kt b/ui/ui-material/src/test/java/androidx/ui/material/ripple/DefaultRippleEffectTest.kt
index b246a39..f78d000 100644
--- a/ui/ui-material/src/test/java/androidx/ui/material/ripple/DefaultRippleEffectTest.kt
+++ b/ui/ui-material/src/test/java/androidx/ui/material/ripple/DefaultRippleEffectTest.kt
@@ -15,11 +15,11 @@
*/
package androidx.ui.material.ripple
-import androidx.ui.core.Density
-import androidx.ui.core.PxSize
-import androidx.ui.core.dp
-import androidx.ui.core.px
-import androidx.ui.core.withDensity
+import androidx.ui.unit.Density
+import androidx.ui.unit.PxSize
+import androidx.ui.unit.dp
+import androidx.ui.unit.px
+import androidx.ui.unit.withDensity
import com.google.common.truth.Truth.assertThat
import org.junit.Test
import org.junit.runner.RunWith