diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index f199629..6c8a292 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -12,7 +12,7 @@ androidx-test = "1.5.0" androidx-testEspresso = "3.5.1" androidx-workManager = "2.8.1" coil = "2.5.0" -google-accompanist = "0.30.1" +google-accompanist = "0.32.0" google-glance-tooling = "0.2.2" kotlin = "1.9.20" kotlin-inject = "0.6.3" @@ -113,7 +113,6 @@ google-accompanistNavigationMaterial = { module = "com.google.accompanist:accomp google-accompanistPager = { module = "com.google.accompanist:accompanist-pager", version.ref = "google-accompanist" } google-accompanistPagerInd = { module = "com.google.accompanist:accompanist-pager-indicators", version.ref = "google-accompanist" } google-accompanistPermissions = { module = "com.google.accompanist:accompanist-permissions", version.ref = "google-accompanist" } -google-accompanistPlaceholderMaterial = { module = "com.google.accompanist:accompanist-placeholder-material", version.ref = "google-accompanist" } google-accompanistSystemUi = { module = "com.google.accompanist:accompanist-systemuicontroller", version.ref = "google-accompanist" } google-firebase-analytics = { module = "com.google.firebase:firebase-analytics-ktx" } google-firebase-bom = "com.google.firebase:firebase-bom:32.5.0" diff --git a/trending/build.gradle.kts b/trending/build.gradle.kts index 0220eb0..2f6ffa7 100644 --- a/trending/build.gradle.kts +++ b/trending/build.gradle.kts @@ -14,7 +14,6 @@ dependencies { implementation(libs.coilCompose) implementation(libs.androidx.pagingRuntime) implementation(libs.androidx.pagingCompose) - implementation(libs.google.accompanistPlaceholderMaterial) implementation(libs.square.sqlDelightAndroidPaging3) implementation(libs.square.sqlDelightCoroutines) testImplementation(libs.square.turbine) diff --git a/trending/src/main/kotlin/net/marcoromano/mooviez/trending/widgets/trending/MoviePlaceHolder.kt b/trending/src/main/kotlin/net/marcoromano/mooviez/trending/widgets/trending/MoviePlaceHolder.kt index 0403afc..d699766 100644 --- a/trending/src/main/kotlin/net/marcoromano/mooviez/trending/widgets/trending/MoviePlaceHolder.kt +++ b/trending/src/main/kotlin/net/marcoromano/mooviez/trending/widgets/trending/MoviePlaceHolder.kt @@ -1,5 +1,6 @@ package net.marcoromano.mooviez.trending.widgets.trending +import androidx.compose.foundation.background import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Spacer @@ -8,6 +9,7 @@ import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.width import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment @@ -16,7 +18,6 @@ import androidx.compose.ui.draw.clip import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp -import com.google.accompanist.placeholder.material.placeholder import net.marcoromano.mooviez.widgets.UserScore @Composable @@ -30,9 +31,9 @@ internal fun MoviePlaceHolder() { Column { Box( modifier = Modifier - .placeholder(true) .aspectRatio(500f / 750f) - .clip(RoundedCornerShape(32f)), + .clip(RoundedCornerShape(8f)) + .background(MaterialTheme.colorScheme.surface), ) Spacer(modifier = Modifier.height(32.dp)) } @@ -48,15 +49,21 @@ internal fun MoviePlaceHolder() { ) { Text( text = "Lorem ipsum lorem ipsum", + modifier = Modifier + .clip(RoundedCornerShape(8f)) + .background(MaterialTheme.colorScheme.surface), + color = MaterialTheme.colorScheme.surface, fontWeight = FontWeight.Bold, - modifier = Modifier.placeholder(true), ) Spacer( modifier = Modifier.height(4.dp), ) Text( - modifier = Modifier.placeholder(true), text = "1999-01-01", + modifier = Modifier + .clip(RoundedCornerShape(8f)) + .background(MaterialTheme.colorScheme.surface), + color = MaterialTheme.colorScheme.surface, ) } }