diff --git a/build.gradle b/build.gradle index fbaf73d9a..12a189c89 100644 --- a/build.gradle +++ b/build.gradle @@ -21,6 +21,7 @@ buildscript { repositories { google() jcenter() + maven { url 'https://dl.bintray.com/kotlin/kotlin-eap/' } } dependencies { @@ -41,9 +42,11 @@ subprojects { mavenCentral() jcenter() - if (Libs.AndroidX.UI.version.endsWith("SNAPSHOT")) { + maven { url 'https://dl.bintray.com/kotlin/kotlin-eap/' } + + if (Libs.AndroidX.Compose.version.endsWith("SNAPSHOT")) { maven { - url "https://androidx.dev/snapshots/builds/${Libs.AndroidX.UI.snapshot}/artifacts/ui/repository/" + url "https://androidx.dev/snapshots/builds/${Libs.AndroidX.Compose.snapshot}/artifacts/ui/repository/" } } } @@ -53,13 +56,13 @@ subprojects { kotlin { target "**/*.kt" ktlint(Versions.ktlint) - licenseHeaderFile project.rootProject.file('spotless/copyright.txt') + licenseHeaderFile rootProject.file('spotless/copyright.txt') } groovyGradle { target '**/*.gradle' - greclipse().configFile(project.rootProject.file('spotless/greclipse.properties')) - licenseHeaderFile project.rootProject.file('spotless/copyright.txt'), + greclipse().configFile(rootProject.file('spotless/greclipse.properties')) + licenseHeaderFile rootProject.file('spotless/copyright.txt'), '(buildscript|apply|import)' } } @@ -75,16 +78,11 @@ subprojects { // Allow use of @OptIn freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn" - // Compose is now based on the Kotlin 1.4 compiler, but we need to use the 1.3.x Kotlin - // library due to library compatibility, etc. Therefore we explicit set our apiVersion - // to 1.3 to fix any warnings. Binary dependencies (such as Compose) can continue to - // use 1.4 if built with that library. - // TODO: remove this once we move to Kotlin 1.4 - apiVersion = "1.3" + freeCompilerArgs += "-Xallow-jvm-ir-dependencies" - // Don't require parens on fun type annotations e.g. `@Composable~()~ () -> Unit` - // TODO: Remove when we move to Kotlin 1.4 - freeCompilerArgs += "-XXLanguage:+NonParenthesizedAnnotationsOnFunctionalTypes" + // Since we're using a pre-release version of the Kotlin compiler, we need + // to disable it's pre-release check + freeCompilerArgs += "-Xskip-prerelease-check" } } diff --git a/buildSrc/src/main/java/dev/chrisbanes/accompanist/buildsrc/dependencies.kt b/buildSrc/src/main/java/dev/chrisbanes/accompanist/buildsrc/dependencies.kt index 6f233253b..48ff8d1f0 100644 --- a/buildSrc/src/main/java/dev/chrisbanes/accompanist/buildsrc/dependencies.kt +++ b/buildSrc/src/main/java/dev/chrisbanes/accompanist/buildsrc/dependencies.kt @@ -28,13 +28,13 @@ object Libs { const val junit = "junit:junit:4.13" object Kotlin { - private const val version = "1.3.72" + const val version = "1.4-M3" const val stdlib = "org.jetbrains.kotlin:kotlin-stdlib:$version" const val gradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:$version" } object Coroutines { - private const val version = "1.3.7" + private const val version = "1.3.7-1.4-M3" const val android = "org.jetbrains.kotlinx:kotlinx-coroutines-android:$version" const val test = "org.jetbrains.kotlinx:kotlinx-coroutines-test:$version" } @@ -50,27 +50,20 @@ object Libs { const val espressoCore = "androidx.test.espresso:espresso-core:3.2.0" } - object UI { - const val snapshot = "6602655" - const val version = "0.1.0-dev14" - - const val core = "androidx.ui:ui-core:$version" - const val foundation = "androidx.ui:ui-foundation:$version" - - const val layout = "androidx.ui:ui-layout:$version" - const val material = "androidx.ui:ui-material:$version" - - const val animation = "androidx.ui:ui-animation:$version" - const val tooling = "androidx.ui:ui-tooling:$version" - const val livedata = "androidx.ui:ui-livedata:$version" - - const val test = "androidx.ui:ui-test:$version" - } - object Compose { - const val version = UI.version - const val kotlinCompilerVersion = "1.3.70-dev-withExperimentalGoogleExtensions-20200424" - const val runtime = "androidx.compose:compose-runtime:$version" + const val snapshot = "" + const val version = "0.1.0-dev15" + const val kotlinCompilerVersion = "1.4.0-dev-withExperimentalGoogleExtensions-20200720" + + const val runtime = "androidx.compose.runtime:runtime:$version" + const val foundation = "androidx.compose.foundation:foundation:${version}" + const val layout = "androidx.compose.foundation:foundation-layout:${version}" + + const val ui = "androidx.compose.ui:ui:${version}" + const val material = "androidx.compose.material:material:${version}" + + const val tooling = "androidx.ui:ui-tooling:${version}" + const val test = "androidx.ui:ui-test:${version}" } const val core = "androidx.core:core:1.2.0" diff --git a/coil/build.gradle b/coil/build.gradle index 9218909cc..9932c2725 100644 --- a/coil/build.gradle +++ b/coil/build.gradle @@ -75,17 +75,18 @@ dependencies { implementation Libs.AndroidX.coreKtx implementation Libs.AndroidX.Compose.runtime - implementation Libs.AndroidX.UI.foundation + implementation Libs.AndroidX.Compose.foundation implementation Libs.Kotlin.stdlib + implementation Libs.Coroutines.android androidTestImplementation Libs.junit androidTestImplementation Libs.truth androidTestImplementation Libs.Coroutines.test - androidTestImplementation Libs.AndroidX.UI.test - androidTestImplementation Libs.AndroidX.UI.core + androidTestImplementation Libs.AndroidX.Compose.test + androidTestImplementation Libs.AndroidX.Compose.ui androidTestImplementation Libs.AndroidX.Test.rules androidTestImplementation Libs.AndroidX.Test.runner } diff --git a/coil/src/androidTest/java/dev/chrisbanes/accompanist/coil/CoilTest.kt b/coil/src/androidTest/java/dev/chrisbanes/accompanist/coil/CoilTest.kt index beb3660f9..21786c81d 100644 --- a/coil/src/androidTest/java/dev/chrisbanes/accompanist/coil/CoilTest.kt +++ b/coil/src/androidTest/java/dev/chrisbanes/accompanist/coil/CoilTest.kt @@ -34,9 +34,9 @@ import androidx.ui.test.assertIsDisplayed import androidx.ui.test.assertPixels import androidx.ui.test.captureToBitmap import androidx.ui.test.createComposeRule -import androidx.ui.test.findByTag -import androidx.ui.test.findByText -import androidx.ui.test.runOnIdleCompose +import androidx.ui.test.onNodeWithTag +import androidx.ui.test.onNodeWithText +import androidx.ui.test.runOnIdle import androidx.ui.unit.dp import coil.request.CachePolicy import coil.request.GetRequest @@ -81,7 +81,7 @@ class CoilTest { // Wait for the Coil request listener to release the latch latch.await(5, TimeUnit.SECONDS) - runOnIdleCompose { + runOnIdle { // And assert that we got a single successful result assertThat(results).hasSize(1) assertThat(results[0]).isInstanceOf(SuccessResult::class.java) @@ -103,7 +103,7 @@ class CoilTest { // Wait for the onRequestCompleted to release the latch latch.await(5, TimeUnit.SECONDS) - findByTag(CoilTestTags.Image) + onNodeWithTag(CoilTestTags.Image) .assertIsDisplayed() .assertSize(composeTestRule.density, 128.dp, 128.dp) } @@ -124,7 +124,7 @@ class CoilTest { // Wait for the onRequestCompleted to release the latch latch.await(5, TimeUnit.SECONDS) - findByTag(CoilTestTags.Image) + onNodeWithTag(CoilTestTags.Image) .assertSize(composeTestRule.density, 128.dp, 128.dp) .assertIsDisplayed() .captureToBitmap() @@ -153,7 +153,7 @@ class CoilTest { } // Assert that the content is completely Red - findByTag(CoilTestTags.Image) + onNodeWithTag(CoilTestTags.Image) .assertSize(composeTestRule.density, 128.dp, 128.dp) .assertIsDisplayed() .captureToBitmap() @@ -166,7 +166,7 @@ class CoilTest { runBlocking { loadCompleteSignal.receive() } // Assert that the content is completely Blue - findByTag(CoilTestTags.Image) + onNodeWithTag(CoilTestTags.Image) .assertSize(composeTestRule.density, 128.dp, 128.dp) .assertIsDisplayed() .captureToBitmap() @@ -230,7 +230,7 @@ class CoilTest { latch.await(5, TimeUnit.SECONDS) // Assert that the whole layout is drawn cyan - findByTag(CoilTestTags.Image) + onNodeWithTag(CoilTestTags.Image) .assertIsDisplayed() .captureToBitmap() .assertPixels { Color.Cyan } @@ -252,7 +252,7 @@ class CoilTest { latch.await(5, TimeUnit.SECONDS) // Assert that the layout is in the tree and has the correct size - findByTag(CoilTestTags.Image) + onNodeWithTag(CoilTestTags.Image) .assertIsDisplayed() .assertSize(composeTestRule.density, 128.dp, 128.dp) } @@ -281,7 +281,7 @@ class CoilTest { } // Assert that the loading component is displayed - findByText("Loading").assertIsDisplayed() + onNodeWithText("Loading").assertIsDisplayed() // Now resume the dispatcher to start the Coil request, and wait for the // request to complete @@ -289,7 +289,7 @@ class CoilTest { latch.await(5, TimeUnit.SECONDS) // And assert that the loading component no longer exists - findByText("Loading").assertDoesNotExist() + onNodeWithText("Loading").assertDoesNotExist() } } @@ -314,7 +314,7 @@ class CoilTest { latch.await(5, TimeUnit.SECONDS) // Assert that the whole layout is drawn red - findByTag(CoilTestTags.Image) + onNodeWithTag(CoilTestTags.Image) .assertIsDisplayed() .captureToBitmap() .assertPixels { Color.Red } diff --git a/coil/src/main/java/dev/chrisbanes/accompanist/coil/Coil.kt b/coil/src/main/java/dev/chrisbanes/accompanist/coil/Coil.kt index cf8e1d609..47ec5642d 100644 --- a/coil/src/main/java/dev/chrisbanes/accompanist/coil/Coil.kt +++ b/coil/src/main/java/dev/chrisbanes/accompanist/coil/Coil.kt @@ -81,8 +81,9 @@ fun CoilImage( // pass the request through is GetRequest -> data // Otherwise we construct a GetRequest using the data parameter - else -> remember(data) { - GetRequest.Builder(ContextAmbient.current).data(data).build() + else -> { + val context = ContextAmbient.current + remember(data) { GetRequest.Builder(context).data(data).build() } } }, alignment = alignment, diff --git a/coil/src/main/java/dev/chrisbanes/accompanist/coil/Crossfade.kt b/coil/src/main/java/dev/chrisbanes/accompanist/coil/Crossfade.kt index cece4ac45..6a2a2153e 100644 --- a/coil/src/main/java/dev/chrisbanes/accompanist/coil/Crossfade.kt +++ b/coil/src/main/java/dev/chrisbanes/accompanist/coil/Crossfade.kt @@ -21,10 +21,11 @@ import androidx.animation.AnimationClockObservable import androidx.animation.FloatPropKey import androidx.animation.createAnimation import androidx.animation.transitionDefinition +import androidx.animation.tween import androidx.compose.Composable -import androidx.compose.NeverEqual import androidx.compose.getValue import androidx.compose.mutableStateOf +import androidx.compose.neverEqualPolicy import androidx.compose.remember import androidx.compose.setValue import androidx.core.util.Pools @@ -47,7 +48,6 @@ import coil.Coil import coil.decode.DataSource import coil.request.GetRequest import coil.request.GetRequestBuilder -import kotlin.math.roundToInt private const val DefaultTransitionDuration = 1000 @@ -190,7 +190,10 @@ private class ObservableCrossfadeImagePainter( // Initial matrix is completely transparent. We use the NeverEqual equivalence check since this // is a mutable entity. - private var matrix by mutableStateOf(ImageLoadingColorMatrix(0f, 0f, 0f), NeverEqual) + private var matrix by mutableStateOf( + value = ImageLoadingColorMatrix(0f, 0f, 0f), + policy = neverEqualPolicy() + ) private val animation = CrossfadeTransition.definition(duration).createAnimation(clock) @@ -264,17 +267,12 @@ private object CrossfadeTransition { } transition { - Alpha using tween { - // Alpha animation runs over the first 50% - duration = durationMs / 2 - } - Brightness using tween { - // Brightness animation runs over the first 75% - duration = (durationMs * 0.75f).roundToInt() - } - Saturation using tween { - duration = durationMs - } + // Alpha animates over the first 50% + Alpha using tween(durationMillis = durationMs / 2) + // Brightness animates over the first 75% + Brightness using tween(durationMillis = durationMs * 3 / 4) + // Saturation animates over whole duration + Saturation using tween(durationMillis = durationMs) } } } diff --git a/mdc-theme/build.gradle b/mdc-theme/build.gradle index 7c546c306..d8fad6eab 100644 --- a/mdc-theme/build.gradle +++ b/mdc-theme/build.gradle @@ -68,7 +68,7 @@ android { dependencies { implementation Libs.AndroidX.coreKtx implementation Libs.AndroidX.Compose.runtime - implementation Libs.AndroidX.UI.material + implementation Libs.AndroidX.Compose.material implementation Libs.mdc // We need to force AppCompat v1.3.0-alpha01 for AppCompatActivity to work with Compose @@ -77,8 +77,8 @@ dependencies { implementation Libs.Kotlin.stdlib androidTestImplementation Libs.junit - androidTestImplementation Libs.AndroidX.UI.test - androidTestImplementation Libs.AndroidX.UI.core + androidTestImplementation Libs.AndroidX.Compose.test + androidTestImplementation Libs.AndroidX.Compose.ui androidTestImplementation Libs.AndroidX.Test.rules androidTestImplementation Libs.AndroidX.Test.runner } diff --git a/mdc-theme/src/main/java/dev/chrisbanes/accompanist/mdctheme/MaterialThemeFromMdcTheme.kt b/mdc-theme/src/main/java/dev/chrisbanes/accompanist/mdctheme/MaterialThemeFromMdcTheme.kt index 89ca1b0a9..551fd8bdf 100644 --- a/mdc-theme/src/main/java/dev/chrisbanes/accompanist/mdctheme/MaterialThemeFromMdcTheme.kt +++ b/mdc-theme/src/main/java/dev/chrisbanes/accompanist/mdctheme/MaterialThemeFromMdcTheme.kt @@ -17,6 +17,7 @@ package dev.chrisbanes.accompanist.mdctheme import android.content.Context +import android.content.res.Configuration import android.content.res.Resources import android.content.res.TypedArray import android.graphics.Typeface @@ -29,8 +30,6 @@ import androidx.core.content.res.getColorOrThrow import androidx.core.content.res.getResourceIdOrThrow import androidx.core.content.res.use import androidx.ui.core.ContextAmbient -import androidx.ui.core.DensityAmbient -import androidx.ui.foundation.isSystemInDarkTheme import androidx.ui.foundation.shape.corner.CornerBasedShape import androidx.ui.foundation.shape.corner.CornerSize import androidx.ui.foundation.shape.corner.CutCornerShape @@ -94,11 +93,11 @@ fun MaterialThemeFromMdcTheme( val (colors, type, shapes) = remember(key) { generateMaterialThemeFromMdcTheme( - context, - readColors, - readTypography, - readShapes, - useTextColors + context = context, + readColors = readColors, + readTypography = readTypography, + readShapes = readShapes, + useTextColors = useTextColors ) } @@ -111,7 +110,7 @@ fun MaterialThemeFromMdcTheme( } /** - * This effect generates the components of an [androidx.ui.material.MaterialTheme], reading the + * This effect generates the components of a [androidx.ui.material.MaterialTheme], reading the * values from an Material Design Components Android theme. * * By default the text colors from any associated `TextAppearance`s from the theme are *not* read. @@ -120,15 +119,16 @@ fun MaterialThemeFromMdcTheme( * You can customize this through the [useTextColors] parameter. * * @param context The context to read the theme from + * @param density The current density * @param readColors whether the read the MDC color palette from the context's theme * @param readTypography whether the read the MDC typography text appearances from the context's theme * @param readShapes whether the read the MDC shape appearances from the context's theme * @param useTextColors whether to read the colors from the `TextAppearance`s associated from the * theme. Defaults to `false` */ -@Composable fun generateMaterialThemeFromMdcTheme( - context: Context = ContextAmbient.current, + context: Context, + density: Density = Density(context), readColors: Boolean = true, readTypography: Boolean = true, readShapes: Boolean = true, @@ -189,7 +189,12 @@ fun generateMaterialThemeFromMdcTheme( } } else { // Else we create an empty color palette based on the configuration's uiMode - if (isSystemInDarkTheme()) darkColorPalette() else lightColorPalette() + val uiMode = context.resources.configuration.uiMode + if ((uiMode and Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_YES) { + darkColorPalette() + } else { + lightColorPalette() + } } /** @@ -205,66 +210,79 @@ fun generateMaterialThemeFromMdcTheme( typography = typography.merge( h1 = textStyleFromTextAppearance( context, + density, ta.getResourceIdOrThrow(R.styleable.AccompanistMdcTheme_textAppearanceHeadline1), useTextColors ), h2 = textStyleFromTextAppearance( context, + density, ta.getResourceIdOrThrow(R.styleable.AccompanistMdcTheme_textAppearanceHeadline2), useTextColors ), h3 = textStyleFromTextAppearance( context, + density, ta.getResourceIdOrThrow(R.styleable.AccompanistMdcTheme_textAppearanceHeadline3), useTextColors ), h4 = textStyleFromTextAppearance( context, + density, ta.getResourceIdOrThrow(R.styleable.AccompanistMdcTheme_textAppearanceHeadline4), useTextColors ), h5 = textStyleFromTextAppearance( context, + density, ta.getResourceIdOrThrow(R.styleable.AccompanistMdcTheme_textAppearanceHeadline5), useTextColors ), h6 = textStyleFromTextAppearance( context, + density, ta.getResourceIdOrThrow(R.styleable.AccompanistMdcTheme_textAppearanceHeadline6), useTextColors ), subtitle1 = textStyleFromTextAppearance( context, + density, ta.getResourceIdOrThrow(R.styleable.AccompanistMdcTheme_textAppearanceSubtitle1), useTextColors ), subtitle2 = textStyleFromTextAppearance( context, + density, ta.getResourceIdOrThrow(R.styleable.AccompanistMdcTheme_textAppearanceSubtitle2), useTextColors ), body1 = textStyleFromTextAppearance( context, + density, ta.getResourceIdOrThrow(R.styleable.AccompanistMdcTheme_textAppearanceBody1), useTextColors ), body2 = textStyleFromTextAppearance( context, + density, ta.getResourceIdOrThrow(R.styleable.AccompanistMdcTheme_textAppearanceBody2), useTextColors ), button = textStyleFromTextAppearance( context, + density, ta.getResourceIdOrThrow(R.styleable.AccompanistMdcTheme_textAppearanceButton), useTextColors ), caption = textStyleFromTextAppearance( context, + density, ta.getResourceIdOrThrow(R.styleable.AccompanistMdcTheme_textAppearanceCaption), useTextColors ), overline = textStyleFromTextAppearance( context, + density, ta.getResourceIdOrThrow(R.styleable.AccompanistMdcTheme_textAppearanceOverline), useTextColors ) @@ -300,9 +318,9 @@ fun generateMaterialThemeFromMdcTheme( } } -@Composable private fun textStyleFromTextAppearance( context: Context, + density: Density, @StyleRes id: Int, useTextColor: Boolean ): TextStyle { @@ -314,8 +332,6 @@ private fun textStyleFromTextAppearance( // TODO read and expand android:fontVariationSettings. // Variable fonts are not supported in Compose yet - val density = DensityAmbient.current - // FYI, this only works with static font files in assets val fontFamilyWeight = when { a.hasValue(R.styleable.AccompanistMdcTextAppearance_android_fontFamily) -> { @@ -378,7 +394,6 @@ private fun textStyleFromTextAppearance( } } -@Composable private fun readShapeAppearance( context: Context, @StyleRes id: Int, diff --git a/sample/build.gradle b/sample/build.gradle index 9481be505..8fb7d7c0f 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -46,7 +46,7 @@ android { composeOptions { kotlinCompilerVersion Libs.AndroidX.Compose.kotlinCompilerVersion - kotlinCompilerExtensionVersion Libs.AndroidX.UI.version + kotlinCompilerExtensionVersion Libs.AndroidX.Compose.version } } @@ -55,9 +55,9 @@ dependencies { implementation project(':coil') implementation Libs.AndroidX.Compose.runtime - implementation Libs.AndroidX.UI.material - implementation Libs.AndroidX.UI.foundation - implementation Libs.AndroidX.UI.layout + implementation Libs.AndroidX.Compose.material + implementation Libs.AndroidX.Compose.foundation + implementation Libs.AndroidX.Compose.layout implementation Libs.AndroidX.coreKtx diff --git a/sample/src/main/java/dev/chrisbanes/accompanist/sample/coil/CoilBasicSample.kt b/sample/src/main/java/dev/chrisbanes/accompanist/sample/coil/CoilBasicSample.kt index f1db5bab4..66c87159a 100644 --- a/sample/src/main/java/dev/chrisbanes/accompanist/sample/coil/CoilBasicSample.kt +++ b/sample/src/main/java/dev/chrisbanes/accompanist/sample/coil/CoilBasicSample.kt @@ -25,8 +25,8 @@ import androidx.ui.core.Alignment import androidx.ui.core.ContextAmbient import androidx.ui.core.Modifier import androidx.ui.core.setContent +import androidx.ui.foundation.ScrollableColumn import androidx.ui.foundation.Text -import androidx.ui.foundation.VerticalScroller import androidx.ui.layout.ExperimentalLayout import androidx.ui.layout.FlowRow import androidx.ui.layout.Stack @@ -70,7 +70,7 @@ private fun Sample() { ) } ) { - VerticalScroller(modifier = Modifier.padding(16.dp)) { + ScrollableColumn(modifier = Modifier.padding(16.dp)) { FlowRow( mainAxisSpacing = 4.dp, crossAxisSpacing = 4.dp diff --git a/sample/src/main/java/dev/chrisbanes/accompanist/sample/coil/CoilGridSample.kt b/sample/src/main/java/dev/chrisbanes/accompanist/sample/coil/CoilGridSample.kt index e2f8ec8c8..e8ee9950b 100644 --- a/sample/src/main/java/dev/chrisbanes/accompanist/sample/coil/CoilGridSample.kt +++ b/sample/src/main/java/dev/chrisbanes/accompanist/sample/coil/CoilGridSample.kt @@ -23,8 +23,8 @@ import androidx.compose.Composable import androidx.compose.Recomposer import androidx.ui.core.Modifier import androidx.ui.core.setContent +import androidx.ui.foundation.ScrollableColumn import androidx.ui.foundation.Text -import androidx.ui.foundation.VerticalScroller import androidx.ui.layout.ExperimentalLayout import androidx.ui.layout.FlowRow import androidx.ui.layout.padding @@ -64,7 +64,7 @@ private fun Sample() { ) } ) { - VerticalScroller(modifier = Modifier.padding(16.dp)) { + ScrollableColumn(modifier = Modifier.padding(16.dp)) { FlowRow( mainAxisSpacing = 4.dp, crossAxisSpacing = 4.dp diff --git a/sample/src/main/java/dev/chrisbanes/accompanist/sample/mdc/MdcSampleActivity.kt b/sample/src/main/java/dev/chrisbanes/accompanist/sample/mdc/MdcSampleActivity.kt index b2798e759..df26c7036 100644 --- a/sample/src/main/java/dev/chrisbanes/accompanist/sample/mdc/MdcSampleActivity.kt +++ b/sample/src/main/java/dev/chrisbanes/accompanist/sample/mdc/MdcSampleActivity.kt @@ -24,8 +24,8 @@ import androidx.compose.Recomposer import androidx.ui.core.Modifier import androidx.ui.core.setContent import androidx.ui.foundation.Icon +import androidx.ui.foundation.ScrollableColumn import androidx.ui.foundation.Text -import androidx.ui.foundation.VerticalScroller import androidx.ui.layout.Column import androidx.ui.layout.Spacer import androidx.ui.layout.padding @@ -70,7 +70,7 @@ fun MdcSample() { ) } ) { - VerticalScroller { + ScrollableColumn { Column(Modifier.padding(16.dp)) { CircularProgressIndicator() Spacer(modifier = Modifier.preferredHeight(8.dp))