diff --git a/examples/imageviewer/build.gradle.kts b/examples/imageviewer/build.gradle.kts index b617eb2383..70be1d66fa 100755 --- a/examples/imageviewer/build.gradle.kts +++ b/examples/imageviewer/build.gradle.kts @@ -11,10 +11,10 @@ buildscript { dependencies { // __LATEST_COMPOSE_RELEASE_VERSION__ - classpath("org.jetbrains.compose:compose-gradle-plugin:0.3.0-build146") + classpath("org.jetbrains.compose:compose-gradle-plugin:0.3.0-build149") classpath("com.android.tools.build:gradle:4.0.1") // __KOTLIN_COMPOSE_VERSION__ - classpath(kotlin("gradle-plugin", version = "1.4.21-2")) + classpath(kotlin("gradle-plugin", version = "1.4.30")) } } diff --git a/examples/imageviewer/common/src/desktopMain/kotlin/example/imageviewer/view/FullImageScreen.kt b/examples/imageviewer/common/src/desktopMain/kotlin/example/imageviewer/view/FullImageScreen.kt index 0d418707cb..293bd5de65 100755 --- a/examples/imageviewer/common/src/desktopMain/kotlin/example/imageviewer/view/FullImageScreen.kt +++ b/examples/imageviewer/common/src/desktopMain/kotlin/example/imageviewer/view/FullImageScreen.kt @@ -1,8 +1,8 @@ package example.imageviewer.view import androidx.compose.foundation.Image -import androidx.compose.foundation.ScrollableRow import androidx.compose.foundation.background +import androidx.compose.foundation.horizontalScroll import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row @@ -12,6 +12,8 @@ import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.preferredHeight import androidx.compose.foundation.layout.preferredSize import androidx.compose.foundation.layout.width +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.ScrollState import androidx.compose.foundation.shape.CircleShape import androidx.compose.material.CircularProgressIndicator import androidx.compose.material.MaterialTheme @@ -142,7 +144,8 @@ fun setToolBar( .align(Alignment.CenterVertically), shape = CircleShape ) { - ScrollableRow { + val state = rememberScrollState(0f) + Row(modifier = Modifier.horizontalScroll(state)) { Row { for (type in FilterType.values()) { FilterButton(content, type) diff --git a/examples/imageviewer/common/src/desktopMain/kotlin/example/imageviewer/view/MainScreen.kt b/examples/imageviewer/common/src/desktopMain/kotlin/example/imageviewer/view/MainScreen.kt index dbb3ffb1ae..28a6e944fd 100755 --- a/examples/imageviewer/common/src/desktopMain/kotlin/example/imageviewer/view/MainScreen.kt +++ b/examples/imageviewer/common/src/desktopMain/kotlin/example/imageviewer/view/MainScreen.kt @@ -1,7 +1,6 @@ package example.imageviewer.view import androidx.compose.foundation.Image -import androidx.compose.foundation.ScrollableColumn import androidx.compose.foundation.VerticalScrollbar import androidx.compose.foundation.background import androidx.compose.foundation.clickable @@ -20,7 +19,10 @@ import androidx.compose.foundation.layout.preferredSize import androidx.compose.foundation.layout.preferredWidth import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.rememberScrollbarAdapter +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.ScrollState import androidx.compose.foundation.shape.CircleShape +import androidx.compose.foundation.verticalScroll import androidx.compose.material.Card import androidx.compose.material.CircularProgressIndicator import androidx.compose.material.Divider @@ -269,7 +271,7 @@ fun setScrollableArea(content: ContentState) { .padding(end = 8.dp) ) { val stateVertical = rememberScrollState(0f) - ScrollableColumn(scrollState = stateVertical) { + Column(modifier = Modifier.verticalScroll(stateVertical)) { var index = 1 Column { for (picture in content.getMiniatures()) {