Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.flint.core.designsystem.component.image

import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.shape.CircleShape
Expand All @@ -10,7 +9,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.RectangleShape
import androidx.compose.ui.graphics.Shape
import androidx.compose.ui.graphics.painter.ColorPainter
import androidx.compose.ui.graphics.painter.Painter
import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.platform.LocalInspectionMode
import androidx.compose.ui.res.painterResource
Expand All @@ -25,6 +24,8 @@ fun NetworkImage(
imageUrl: Any?,
modifier: Modifier = Modifier,
shape: Shape = RectangleShape,
placePainter: Painter = painterResource(R.drawable.img_network_loading),
errorPainter: Painter = painterResource(R.drawable.img_network_loading),
contentScale: ContentScale = ContentScale.Crop,
contentDescription: String? = null,
) {
Expand All @@ -40,7 +41,8 @@ fun NetworkImage(
model = imageUrl,
contentDescription = contentDescription,
contentScale = contentScale,
error = ColorPainter(FlintTheme.colors.gray200),
placeholder = placePainter,
error = errorPainter,
modifier = modifier.clip(shape),
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ fun CollectionItem(
.width(260.dp)
.height(180.dp)
.clip(RoundedCornerShape(12.dp))
.background(FlintTheme.colors.gray200)
.noRippleClickable {
onItemClick(collectionItemModel.id)
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,33 +95,29 @@ private fun CollectionFileContent(
modifier: Modifier = Modifier,
) {
Box(
modifier =
modifier
.clip(RoundedCornerShape(12.dp))
.background(FlintTheme.colors.gray800),
modifier = modifier
.clip(RoundedCornerShape(12.dp))
.background(FlintTheme.colors.gray800),
) {
CollectionPocketPoster(
imageUrl = poster2Url,
modifier =
Modifier
.offset(x = 16.dp, y = 8.dp),
modifier = Modifier.offset(x = 16.dp, y = 8.dp),
)

CollectionPocketPoster(
imageUrl = poster1Url,
modifier =
Modifier
.rotate(15f)
.offset(x = 20.dp, y = 15.dp)
.dropShadow(
shape = RoundedCornerShape(12.dp),
color = Color(0xFF000000).copy(alpha = 0.35f),
offsetX = (-4).dp,
offsetY = 0.dp,
blur = 10.dp,
spread = 0.dp,
).align(Alignment.TopCenter)
,
modifier = Modifier
.rotate(15f)
.offset(x = 20.dp, y = 15.dp)
.dropShadow(
shape = RoundedCornerShape(12.dp),
color = Color(0xFF000000).copy(alpha = 0.35f),
offsetX = (-4).dp,
offsetY = 0.dp,
blur = 10.dp,
spread = 0.dp,
)
.align(Alignment.TopCenter),
)

Box(
Expand All @@ -133,7 +129,8 @@ private fun CollectionFileContent(
.paint(
painter = painterResource(id = R.drawable.img_folder_fg),
contentScale = ContentScale.FillWidth,
).padding(start = 12.dp, top = 12.dp, bottom = 9.dp),
)
.padding(start = 12.dp, top = 12.dp, bottom = 9.dp),
) {
Column(
horizontalAlignment = Alignment.End,
Expand Down Expand Up @@ -203,11 +200,9 @@ private fun CollectionPocketPoster(
) {
NetworkImage(
imageUrl = imageUrl,
modifier =
modifier
.size(width = 80.dp, height = 120.dp)
.clip(RoundedCornerShape(12.dp))
.background(Color.White),
modifier = modifier
.size(width = 80.dp, height = 120.dp)
.clip(RoundedCornerShape(12.dp)),
)
}

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.