Putting background in front of all images
This commit is contained in:
+12
-2
@@ -49,11 +49,21 @@ fun LottieFileItemView(
|
|||||||
horizontalArrangement = Arrangement.spacedBy(12.dp),
|
horizontalArrangement = Arrangement.spacedBy(12.dp),
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
content = {
|
content = {
|
||||||
CustomImageView(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.size(44.dp)
|
.size(44.dp)
|
||||||
.clip(CircleShape),
|
.clip(CircleShape),
|
||||||
data = lottiefile.createdBy?.avatarUrl ?: "null",
|
content = {
|
||||||
|
CustomImageView(
|
||||||
|
modifier = Modifier.matchParentSize(),
|
||||||
|
data = lottiefile.createdBy?.avatarUrl ?: "null",
|
||||||
|
)
|
||||||
|
Box(
|
||||||
|
modifier = Modifier
|
||||||
|
.matchParentSize()
|
||||||
|
.background(color = AppColor.BlackOverlay001)
|
||||||
|
)
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
Column(
|
Column(
|
||||||
|
|||||||
+15
-2
@@ -1,5 +1,6 @@
|
|||||||
package com.ericampire.android.androidstudycase.presentation.screen.home.ui
|
package com.ericampire.android.androidstudycase.presentation.screen.home.ui
|
||||||
|
|
||||||
|
import androidx.compose.foundation.background
|
||||||
import androidx.compose.foundation.clickable
|
import androidx.compose.foundation.clickable
|
||||||
import androidx.compose.foundation.layout.*
|
import androidx.compose.foundation.layout.*
|
||||||
import androidx.compose.foundation.shape.CircleShape
|
import androidx.compose.foundation.shape.CircleShape
|
||||||
@@ -18,6 +19,7 @@ import com.ericampire.android.androidstudycase.domain.entity.Blog
|
|||||||
import com.ericampire.android.androidstudycase.domain.entity.Lottiefile
|
import com.ericampire.android.androidstudycase.domain.entity.Lottiefile
|
||||||
import com.ericampire.android.androidstudycase.presentation.custom.CustomImageView
|
import com.ericampire.android.androidstudycase.presentation.custom.CustomImageView
|
||||||
import com.ericampire.android.androidstudycase.presentation.theme.AndroidStudyCaseTheme
|
import com.ericampire.android.androidstudycase.presentation.theme.AndroidStudyCaseTheme
|
||||||
|
import com.ericampire.android.androidstudycase.presentation.theme.AppColor
|
||||||
import com.ericampire.android.androidstudycase.util.BlogProvider
|
import com.ericampire.android.androidstudycase.util.BlogProvider
|
||||||
import com.ericampire.android.androidstudycase.util.LottieFileProvider
|
import com.ericampire.android.androidstudycase.util.LottieFileProvider
|
||||||
|
|
||||||
@@ -36,14 +38,25 @@ fun BlogItemView(
|
|||||||
horizontalArrangement = Arrangement.spacedBy(12.dp),
|
horizontalArrangement = Arrangement.spacedBy(12.dp),
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
content = {
|
content = {
|
||||||
CustomImageView(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.height(80.dp)
|
.height(80.dp)
|
||||||
.width(130.dp)
|
.width(130.dp)
|
||||||
.clip(MaterialTheme.shapes.medium),
|
.clip(MaterialTheme.shapes.medium),
|
||||||
data = blog.imageUrl,
|
content = {
|
||||||
|
CustomImageView(
|
||||||
|
modifier = Modifier.matchParentSize(),
|
||||||
|
data = blog.imageUrl,
|
||||||
|
)
|
||||||
|
Box(
|
||||||
|
modifier = Modifier
|
||||||
|
.matchParentSize()
|
||||||
|
.background(color = AppColor.BlackOverlay)
|
||||||
|
)
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
Text(
|
Text(
|
||||||
maxLines = 3,
|
maxLines = 3,
|
||||||
text = blog.title,
|
text = blog.title,
|
||||||
|
|||||||
@@ -10,4 +10,6 @@ object AppColor {
|
|||||||
val Purple700 = Color(0xFF3700B3)
|
val Purple700 = Color(0xFF3700B3)
|
||||||
val Teal200 = Color(0xFF03DAC5)
|
val Teal200 = Color(0xFF03DAC5)
|
||||||
val Black001 = Color(0xFF222222)
|
val Black001 = Color(0xFF222222)
|
||||||
|
val BlackOverlay = Color(0x4D000000)
|
||||||
|
val BlackOverlay001 = Color(0x1A000000)
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user