From 9dbd95e78b425738eb9ad028d5137da6e8e799ed Mon Sep 17 00:00:00 2001 From: Igor Demin Date: Wed, 28 Feb 2024 13:47:13 +0100 Subject: [PATCH] Widgets Gallery. Fix imports It didn't compile --- .../demo/widgets/ui/screens/AppBars.kt | 30 ++++++++++++++++--- .../compose/demo/widgets/ui/screens/Chips.kt | 10 +++++-- .../demo/widgets/ui/screens/UICards.kt | 19 ++++++++++-- 3 files changed, 50 insertions(+), 9 deletions(-) diff --git a/examples/widgets-gallery/shared/src/commonMain/kotlin/org/jetbrains/compose/demo/widgets/ui/screens/AppBars.kt b/examples/widgets-gallery/shared/src/commonMain/kotlin/org/jetbrains/compose/demo/widgets/ui/screens/AppBars.kt index 350b0cb345..787ec8f156 100644 --- a/examples/widgets-gallery/shared/src/commonMain/kotlin/org/jetbrains/compose/demo/widgets/ui/screens/AppBars.kt +++ b/examples/widgets-gallery/shared/src/commonMain/kotlin/org/jetbrains/compose/demo/widgets/ui/screens/AppBars.kt @@ -1,15 +1,30 @@ package org.jetbrains.compose.demo.widgets.ui.screens import androidx.compose.foundation.Image -import androidx.compose.foundation.layout.* +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.requiredSize import androidx.compose.foundation.shape.CircleShape -import androidx.compose.material.* +import androidx.compose.material.BottomAppBar +import androidx.compose.material.BottomNavigation +import androidx.compose.material.BottomNavigationItem +import androidx.compose.material.Icon +import androidx.compose.material.IconButton +import androidx.compose.material.MaterialTheme +import androidx.compose.material.Text +import androidx.compose.material.TopAppBar import androidx.compose.material.icons.Icons import androidx.compose.material.icons.automirrored.filled.ArrowBack import androidx.compose.material.icons.automirrored.outlined.ReadMore import androidx.compose.material.icons.filled.MoreHoriz import androidx.compose.material.icons.filled.StarBorder -import androidx.compose.material.icons.outlined.* +import androidx.compose.material.icons.outlined.CleanHands +import androidx.compose.material.icons.outlined.Home +import androidx.compose.material.icons.outlined.LibraryMusic +import androidx.compose.material.icons.outlined.Search import androidx.compose.runtime.Composable import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember @@ -17,14 +32,21 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.platform.testTag import androidx.compose.ui.unit.dp -import org.jetbrains.compose.resources.painterResource import org.jetbrains.compose.demo.widgets.theme.twitterColor import org.jetbrains.compose.demo.widgets.ui.WidgetsType import org.jetbrains.compose.demo.widgets.ui.utils.SubtitleText import org.jetbrains.compose.demo.widgets.ui.utils.TitleText import org.jetbrains.compose.resources.ExperimentalResourceApi +import org.jetbrains.compose.resources.painterResource import org.jetbrains.compose.resources.stringResource import widgets_gallery.shared.generated.resources.Res +import widgets_gallery.shared.generated.resources.ic_instagram +import widgets_gallery.shared.generated.resources.ic_send +import widgets_gallery.shared.generated.resources.ic_twitter +import widgets_gallery.shared.generated.resources.p6 +import widgets_gallery.shared.generated.resources.spotify_nav_home +import widgets_gallery.shared.generated.resources.spotify_nav_library +import widgets_gallery.shared.generated.resources.spotify_nav_search @Composable fun AppBars() { diff --git a/examples/widgets-gallery/shared/src/commonMain/kotlin/org/jetbrains/compose/demo/widgets/ui/screens/Chips.kt b/examples/widgets-gallery/shared/src/commonMain/kotlin/org/jetbrains/compose/demo/widgets/ui/screens/Chips.kt index ce37098f20..3bc28ff184 100644 --- a/examples/widgets-gallery/shared/src/commonMain/kotlin/org/jetbrains/compose/demo/widgets/ui/screens/Chips.kt +++ b/examples/widgets-gallery/shared/src/commonMain/kotlin/org/jetbrains/compose/demo/widgets/ui/screens/Chips.kt @@ -2,7 +2,11 @@ package org.jetbrains.compose.demo.widgets.ui.screens import androidx.compose.foundation.BorderStroke import androidx.compose.foundation.Image -import androidx.compose.foundation.layout.* +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.requiredSize import androidx.compose.foundation.shape.CircleShape import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material.Button @@ -17,11 +21,13 @@ import androidx.compose.ui.platform.testTag import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp import org.jetbrains.compose.demo.widgets.ui.WidgetsType -import org.jetbrains.compose.resources.painterResource import org.jetbrains.compose.demo.widgets.ui.utils.SubtitleText import org.jetbrains.compose.resources.DrawableResource import org.jetbrains.compose.resources.ExperimentalResourceApi +import org.jetbrains.compose.resources.painterResource import widgets_gallery.shared.generated.resources.Res +import widgets_gallery.shared.generated.resources.p2 +import widgets_gallery.shared.generated.resources.p6 @OptIn(ExperimentalResourceApi::class) @Composable diff --git a/examples/widgets-gallery/shared/src/commonMain/kotlin/org/jetbrains/compose/demo/widgets/ui/screens/UICards.kt b/examples/widgets-gallery/shared/src/commonMain/kotlin/org/jetbrains/compose/demo/widgets/ui/screens/UICards.kt index b89579ae13..ea3c201c0a 100644 --- a/examples/widgets-gallery/shared/src/commonMain/kotlin/org/jetbrains/compose/demo/widgets/ui/screens/UICards.kt +++ b/examples/widgets-gallery/shared/src/commonMain/kotlin/org/jetbrains/compose/demo/widgets/ui/screens/UICards.kt @@ -1,9 +1,19 @@ package org.jetbrains.compose.demo.widgets.ui.screens import androidx.compose.foundation.Image -import androidx.compose.foundation.layout.* +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.requiredSize import androidx.compose.foundation.shape.RoundedCornerShape -import androidx.compose.material.* +import androidx.compose.material.Card +import androidx.compose.material.Divider +import androidx.compose.material.ExperimentalMaterialApi +import androidx.compose.material.Icon +import androidx.compose.material.ListItem +import androidx.compose.material.MaterialTheme +import androidx.compose.material.Text import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.ShoppingCart import androidx.compose.runtime.Composable @@ -12,11 +22,14 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.platform.testTag import androidx.compose.ui.unit.dp import org.jetbrains.compose.demo.widgets.data.DemoDataProvider -import org.jetbrains.compose.resources.painterResource import org.jetbrains.compose.demo.widgets.theme.typography import org.jetbrains.compose.demo.widgets.ui.WidgetsType import org.jetbrains.compose.resources.ExperimentalResourceApi +import org.jetbrains.compose.resources.painterResource import widgets_gallery.shared.generated.resources.Res +import widgets_gallery.shared.generated.resources.p1 +import widgets_gallery.shared.generated.resources.p2 +import widgets_gallery.shared.generated.resources.p3 @OptIn(ExperimentalMaterialApi::class, ExperimentalResourceApi::class) @Composable