diff --git a/src/main/kotlin/com/looker/droidify/ui/compose/components/ProductCard.kt b/src/main/kotlin/com/looker/droidify/ui/compose/components/ProductCard.kt index d6248459..c0f4c1ca 100644 --- a/src/main/kotlin/com/looker/droidify/ui/compose/components/ProductCard.kt +++ b/src/main/kotlin/com/looker/droidify/ui/compose/components/ProductCard.kt @@ -2,7 +2,11 @@ package com.looker.droidify.ui.compose.components import androidx.compose.foundation.background import androidx.compose.foundation.clickable -import androidx.compose.foundation.layout.* +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.requiredSize +import androidx.compose.foundation.layout.size import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text diff --git a/src/main/kotlin/com/looker/droidify/ui/compose/components/ProductsListItem.kt b/src/main/kotlin/com/looker/droidify/ui/compose/components/ProductsListItem.kt index 6cd77de2..0ef05b65 100644 --- a/src/main/kotlin/com/looker/droidify/ui/compose/components/ProductsListItem.kt +++ b/src/main/kotlin/com/looker/droidify/ui/compose/components/ProductsListItem.kt @@ -1,11 +1,24 @@ package com.looker.droidify.ui.compose.components -import androidx.compose.foundation.layout.* +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.fillMaxHeight +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.wrapContentHeight import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.Favorite import androidx.compose.material.icons.filled.FavoriteBorder -import androidx.compose.material3.* import androidx.compose.material3.ButtonDefaults.buttonColors +import androidx.compose.material3.FilledTonalButton +import androidx.compose.material3.Icon +import androidx.compose.material3.IconButton +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf diff --git a/src/main/kotlin/com/looker/droidify/ui/compose/components/RespositoryItem.kt b/src/main/kotlin/com/looker/droidify/ui/compose/components/RespositoryItem.kt index 066d46ce..2d99bf45 100644 --- a/src/main/kotlin/com/looker/droidify/ui/compose/components/RespositoryItem.kt +++ b/src/main/kotlin/com/looker/droidify/ui/compose/components/RespositoryItem.kt @@ -4,7 +4,11 @@ import androidx.compose.animation.AnimatedVisibility import androidx.compose.animation.animateColorAsState import androidx.compose.foundation.ExperimentalFoundationApi import androidx.compose.foundation.combinedClickable -import androidx.compose.foundation.layout.* +import androidx.compose.foundation.layout.Arrangement +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.material.icons.Icons import androidx.compose.material.icons.filled.Done import androidx.compose.material3.Icon diff --git a/src/main/kotlin/com/looker/droidify/ui/fragments/ExploreFragment.kt b/src/main/kotlin/com/looker/droidify/ui/fragments/ExploreFragment.kt index e8b7b4c9..a9bcdd6b 100644 --- a/src/main/kotlin/com/looker/droidify/ui/fragments/ExploreFragment.kt +++ b/src/main/kotlin/com/looker/droidify/ui/fragments/ExploreFragment.kt @@ -87,11 +87,11 @@ class ExploreFragment : MainNavFragmentX() { ExpandableSearchAction( query = searchQuery.orEmpty(), onClose = { - viewModel.setSearchQuery("") + viewModel.searchQuery.postValue("") }, onQueryChanged = { query -> if (isResumed && query != searchQuery) - viewModel.setSearchQuery(query) + viewModel.searchQuery.postValue(query) } ) TopBarAction(icon = Icons.Rounded.Sync) { diff --git a/src/main/kotlin/com/looker/droidify/ui/fragments/InstalledFragment.kt b/src/main/kotlin/com/looker/droidify/ui/fragments/InstalledFragment.kt index c14ef716..f75fb18d 100644 --- a/src/main/kotlin/com/looker/droidify/ui/fragments/InstalledFragment.kt +++ b/src/main/kotlin/com/looker/droidify/ui/fragments/InstalledFragment.kt @@ -106,11 +106,11 @@ class InstalledFragment : MainNavFragmentX() { ExpandableSearchAction( query = searchQuery.orEmpty(), onClose = { - viewModel.setSearchQuery("") + viewModel.searchQuery.postValue("") }, onQueryChanged = { query -> if (isResumed && query != searchQuery) - viewModel.setSearchQuery(query) + viewModel.searchQuery.postValue(query) } ) TopBarAction(icon = Icons.Rounded.Sync) { diff --git a/src/main/kotlin/com/looker/droidify/ui/fragments/LatestFragment.kt b/src/main/kotlin/com/looker/droidify/ui/fragments/LatestFragment.kt index fe251e53..a64d4f17 100644 --- a/src/main/kotlin/com/looker/droidify/ui/fragments/LatestFragment.kt +++ b/src/main/kotlin/com/looker/droidify/ui/fragments/LatestFragment.kt @@ -98,11 +98,11 @@ class LatestFragment : MainNavFragmentX() { ExpandableSearchAction( query = searchQuery.orEmpty(), onClose = { - viewModel.setSearchQuery("") + viewModel.searchQuery.postValue("") }, onQueryChanged = { query -> if (isResumed && query != searchQuery) - viewModel.setSearchQuery(query) + viewModel.searchQuery.postValue(query) } ) TopBarAction(icon = Icons.Rounded.Sync) { diff --git a/src/main/res/layout/fragment_compose.xml b/src/main/res/layout/fragment_compose.xml deleted file mode 100644 index 2550aee8..00000000 --- a/src/main/res/layout/fragment_compose.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - -