-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from PawWithU/feature/home_main
Feature/home_main : 홈화면 & 봉사후기 화면 구현 완료
- Loading branch information
Showing
149 changed files
with
2,391 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
core/data/src/main/java/com/kusitms/connectdog/core/data/repository/HomeRepository.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.kusitms.connectdog.core.data.repository | ||
|
||
import com.kusitms.connectdog.core.model.Announcement | ||
import com.kusitms.connectdog.core.model.Review | ||
|
||
interface HomeRepository { | ||
suspend fun getAnnouncementList(): List<Announcement> | ||
|
||
suspend fun getReviewList(): List<Review> | ||
} |
18 changes: 18 additions & 0 deletions
18
core/data/src/main/java/com/kusitms/connectdog/core/data/repository/HomeRepositoryImpl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.kusitms.connectdog.core.data.repository | ||
|
||
import com.kusitms.connectdog.core.data.api.ApiService | ||
import com.kusitms.connectdog.core.model.Announcement | ||
import com.kusitms.connectdog.core.model.Review | ||
import javax.inject.Inject | ||
|
||
internal class HomeRepositoryImpl @Inject constructor( | ||
private val api: ApiService | ||
) : HomeRepository { | ||
override suspend fun getAnnouncementList(): List<Announcement> { | ||
TODO("Not yet implemented") | ||
} | ||
|
||
override suspend fun getReviewList(): List<Review> { | ||
TODO("Not yet implemented") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Binary file added
BIN
+151 KB
.../.transforms/cc34aa3339a2c1d78a79e62e04b337d0/transformed/classes/classes_dex/classes.dex
Binary file not shown.
Binary file added
BIN
+3.42 KB
...itms/connectdog/core/designsystem/component/ComposableSingletons$ContentKt$lambda-1$1.dex
Binary file not shown.
Binary file added
BIN
+1.65 KB
...dex/com/kusitms/connectdog/core/designsystem/component/ComposableSingletons$ContentKt.dex
Binary file not shown.
Binary file added
BIN
+2.26 KB
...ebug/debug_dex/com/kusitms/connectdog/core/designsystem/component/ContentKt$Content$2.dex
Binary file not shown.
Binary file added
BIN
+1.76 KB
...bug_dex/com/kusitms/connectdog/core/designsystem/component/ContentKt$ContentPreview$1.dex
Binary file not shown.
Binary file added
BIN
+1.98 KB
...g/debug_dex/com/kusitms/connectdog/core/designsystem/component/ContentKt$TitleValue$2.dex
Binary file not shown.
Binary file added
BIN
+14.5 KB
...nsformed/debug/debug_dex/com/kusitms/connectdog/core/designsystem/component/ContentKt.dex
Binary file not shown.
Binary file added
BIN
+2.15 KB
...tms/connectdog/core/designsystem/component/InformationContentKt$AnnouncementContent$1.dex
Binary file not shown.
Binary file added
BIN
+2.12 KB
...m/kusitms/connectdog/core/designsystem/component/InformationContentKt$RecentContent$1.dex
Binary file not shown.
Binary file added
BIN
+2.12 KB
...m/kusitms/connectdog/core/designsystem/component/InformationContentKt$ReviewContent$1.dex
Binary file not shown.
Binary file added
BIN
+6.78 KB
...bug/debug_dex/com/kusitms/connectdog/core/designsystem/component/InformationContentKt.dex
Binary file not shown.
Binary file added
BIN
+3.3 KB
...g/debug_dex/com/kusitms/connectdog/core/designsystem/component/LiveLiterals$ContentKt.dex
Binary file not shown.
Binary file added
BIN
+2.5 KB
...ug_dex/com/kusitms/connectdog/core/designsystem/component/LiveLiterals$NetworkImageKt.dex
Binary file not shown.
Binary file added
BIN
+10.5 KB
...com/kusitms/connectdog/core/designsystem/component/LiveLiterals$ReviewRecentContentKt.dex
Binary file not shown.
Binary file added
BIN
+6.71 KB
...debug_dex/com/kusitms/connectdog/core/designsystem/component/LiveLiterals$TopAppBarKt.dex
Binary file not shown.
Binary file added
BIN
+1.66 KB
...ex/com/kusitms/connectdog/core/designsystem/component/NetworkImageKt$NetworkImage$1$1.dex
Binary file not shown.
Binary file added
BIN
+3.41 KB
..._dex/com/kusitms/connectdog/core/designsystem/component/NetworkImageKt$NetworkImage$2.dex
Binary file not shown.
Binary file added
BIN
+2.25 KB
..._dex/com/kusitms/connectdog/core/designsystem/component/NetworkImageKt$NetworkImage$3.dex
Binary file not shown.
Binary file added
BIN
+1.83 KB
...m/kusitms/connectdog/core/designsystem/component/NetworkImageKt$NetworkImagePreview$1.dex
Binary file not shown.
Binary file added
BIN
+7.73 KB
...med/debug/debug_dex/com/kusitms/connectdog/core/designsystem/component/NetworkImageKt.dex
Binary file not shown.
Binary file added
BIN
+2.33 KB
...ectdog/core/designsystem/component/ReviewRecentContentKt$ConnectDogCommunityContent$2.dex
Binary file not shown.
Binary file added
BIN
+4.07 KB
...sitms/connectdog/core/designsystem/component/ReviewRecentContentKt$ConnectDogRecent$1.dex
Binary file not shown.
Binary file added
BIN
+3.01 KB
...sitms/connectdog/core/designsystem/component/ReviewRecentContentKt$ConnectDogRecent$2.dex
Binary file not shown.
Binary file added
BIN
+2.07 KB
...sitms/connectdog/core/designsystem/component/ReviewRecentContentKt$ConnectDogRecent$3.dex
Binary file not shown.
Binary file added
BIN
+2.87 KB
...sitms/connectdog/core/designsystem/component/ReviewRecentContentKt$ConnectDogReview$1.dex
Binary file not shown.
Binary file added
BIN
+3.01 KB
...sitms/connectdog/core/designsystem/component/ReviewRecentContentKt$ConnectDogReview$2.dex
Binary file not shown.
Binary file added
BIN
+2.07 KB
...sitms/connectdog/core/designsystem/component/ReviewRecentContentKt$ConnectDogReview$3.dex
Binary file not shown.
Binary file added
BIN
+2 KB
...kusitms/connectdog/core/designsystem/component/ReviewRecentContentKt$ProfileContent$2.dex
Binary file not shown.
Binary file added
BIN
+1.86 KB
...s/connectdog/core/designsystem/component/ReviewRecentContentKt$ReviewContentPreview$1.dex
Binary file not shown.
Binary file added
BIN
+24.8 KB
...ug/debug_dex/com/kusitms/connectdog/core/designsystem/component/ReviewRecentContentKt.dex
Binary file not shown.
Binary file added
BIN
+4.5 KB
...sitms/connectdog/core/designsystem/component/TopAppBarKt$ConnectDogTopAppBar$icon$1$1.dex
Binary file not shown.
Binary file added
BIN
+19.6 KB
...formed/debug/debug_dex/com/kusitms/connectdog/core/designsystem/component/TopAppBarKt.dex
Binary file not shown.
Binary file added
BIN
+3.5 KB
...30/transformed/debug/debug_dex/com/kusitms/connectdog/core/designsystem/theme/ColorKt.dex
Binary file not shown.
Binary file added
BIN
+5.22 KB
...b30/transformed/debug/debug_dex/com/kusitms/connectdog/core/designsystem/theme/TypeKt.dex
Binary file not shown.
Binary file added
BIN
+3.29 KB
...ms/connectdog/core/designsystem/component/ComposableSingletons$ContentKt$lambda-1$1.class
Binary file not shown.
Binary file added
BIN
+1.55 KB
...g/com/kusitms/connectdog/core/designsystem/component/ComposableSingletons$ContentKt.class
Binary file not shown.
Binary file added
BIN
+2.34 KB
...es_dir/debug/com/kusitms/connectdog/core/designsystem/component/ContentKt$Content$2.class
Binary file not shown.
Binary file added
BIN
+1.54 KB
...debug/com/kusitms/connectdog/core/designsystem/component/ContentKt$ContentPreview$1.class
Binary file not shown.
Binary file added
BIN
+1.91 KB
...dir/debug/com/kusitms/connectdog/core/designsystem/component/ContentKt$TitleValue$2.class
Binary file not shown.
Binary file added
BIN
+17.2 KB
...rary_classes_dir/debug/com/kusitms/connectdog/core/designsystem/component/ContentKt.class
Binary file not shown.
Binary file added
BIN
+2.09 KB
...s/connectdog/core/designsystem/component/InformationContentKt$AnnouncementContent$1.class
Binary file not shown.
Binary file added
BIN
+2.1 KB
...kusitms/connectdog/core/designsystem/component/InformationContentKt$RecentContent$1.class
Binary file not shown.
Binary file added
BIN
+2.1 KB
...kusitms/connectdog/core/designsystem/component/InformationContentKt$ReviewContent$1.class
Binary file not shown.
Binary file added
BIN
+7.05 KB
...s_dir/debug/com/kusitms/connectdog/core/designsystem/component/InformationContentKt.class
Binary file not shown.
Binary file added
BIN
+3.2 KB
...dir/debug/com/kusitms/connectdog/core/designsystem/component/LiveLiterals$ContentKt.class
Binary file not shown.
Binary file added
BIN
+2.33 KB
...ebug/com/kusitms/connectdog/core/designsystem/component/LiveLiterals$NetworkImageKt.class
Binary file not shown.
Binary file added
BIN
+11 KB
...m/kusitms/connectdog/core/designsystem/component/LiveLiterals$ReviewRecentContentKt.class
Binary file not shown.
Binary file added
BIN
+1.24 KB
.../com/kusitms/connectdog/core/designsystem/component/NetworkImageKt$NetworkImage$1$1.class
Binary file not shown.
Binary file added
BIN
+3.6 KB
...ug/com/kusitms/connectdog/core/designsystem/component/NetworkImageKt$NetworkImage$2.class
Binary file not shown.
Binary file added
BIN
+2.35 KB
...ug/com/kusitms/connectdog/core/designsystem/component/NetworkImageKt$NetworkImage$3.class
Binary file not shown.
Binary file added
BIN
+1.61 KB
...kusitms/connectdog/core/designsystem/component/NetworkImageKt$NetworkImagePreview$1.class
Binary file not shown.
Binary file added
BIN
+8.65 KB
...classes_dir/debug/com/kusitms/connectdog/core/designsystem/component/NetworkImageKt.class
Binary file not shown.
Binary file added
BIN
+2.71 KB
...tdog/core/designsystem/component/ReviewRecentContentKt$ConnectDogCommunityContent$2.class
Binary file not shown.
Binary file added
BIN
+4.32 KB
...tms/connectdog/core/designsystem/component/ReviewRecentContentKt$ConnectDogRecent$1.class
Binary file not shown.
Binary file added
BIN
+2.87 KB
...tms/connectdog/core/designsystem/component/ReviewRecentContentKt$ConnectDogRecent$2.class
Binary file not shown.
Binary file added
BIN
+2 KB
...tms/connectdog/core/designsystem/component/ReviewRecentContentKt$ConnectDogRecent$3.class
Binary file not shown.
Binary file added
BIN
+2.76 KB
...tms/connectdog/core/designsystem/component/ReviewRecentContentKt$ConnectDogReview$1.class
Binary file not shown.
Binary file added
BIN
+2.87 KB
...tms/connectdog/core/designsystem/component/ReviewRecentContentKt$ConnectDogReview$2.class
Binary file not shown.
Binary file added
BIN
+2 KB
...tms/connectdog/core/designsystem/component/ReviewRecentContentKt$ConnectDogReview$3.class
Binary file not shown.
Binary file added
BIN
+1.9 KB
...sitms/connectdog/core/designsystem/component/ReviewRecentContentKt$ProfileContent$2.class
Binary file not shown.
Binary file added
BIN
+1.64 KB
...connectdog/core/designsystem/component/ReviewRecentContentKt$ReviewContentPreview$1.class
Binary file not shown.
Binary file added
BIN
+29 KB
..._dir/debug/com/kusitms/connectdog/core/designsystem/component/ReviewRecentContentKt.class
Binary file not shown.
Binary file added
BIN
+3.29 KB
...ms/connectdog/core/designsystem/component/ComposableSingletons$ContentKt$lambda-1$1.class
Binary file not shown.
Binary file added
BIN
+1.55 KB
...g/com/kusitms/connectdog/core/designsystem/component/ComposableSingletons$ContentKt.class
Binary file not shown.
Binary file added
BIN
+2.34 KB
...lasses/debug/com/kusitms/connectdog/core/designsystem/component/ContentKt$Content$2.class
Binary file not shown.
Binary file added
BIN
+1.54 KB
...debug/com/kusitms/connectdog/core/designsystem/component/ContentKt$ContentPreview$1.class
Binary file not shown.
Binary file added
BIN
+1.91 KB
...ses/debug/com/kusitms/connectdog/core/designsystem/component/ContentKt$TitleValue$2.class
Binary file not shown.
Binary file added
BIN
+17.2 KB
...p/kotlin-classes/debug/com/kusitms/connectdog/core/designsystem/component/ContentKt.class
Binary file not shown.
Binary file added
BIN
+2.09 KB
...s/connectdog/core/designsystem/component/InformationContentKt$AnnouncementContent$1.class
Binary file not shown.
Binary file added
BIN
+2.1 KB
...kusitms/connectdog/core/designsystem/component/InformationContentKt$RecentContent$1.class
Binary file not shown.
Binary file added
BIN
+2.1 KB
...kusitms/connectdog/core/designsystem/component/InformationContentKt$ReviewContent$1.class
Binary file not shown.
Binary file added
BIN
+7.05 KB
...asses/debug/com/kusitms/connectdog/core/designsystem/component/InformationContentKt.class
Binary file not shown.
Binary file added
BIN
+3.2 KB
...ses/debug/com/kusitms/connectdog/core/designsystem/component/LiveLiterals$ContentKt.class
Binary file not shown.
Binary file added
BIN
+2.33 KB
...ebug/com/kusitms/connectdog/core/designsystem/component/LiveLiterals$NetworkImageKt.class
Binary file not shown.
Binary file added
BIN
+11 KB
...m/kusitms/connectdog/core/designsystem/component/LiveLiterals$ReviewRecentContentKt.class
Binary file not shown.
Binary file added
BIN
+1.24 KB
.../com/kusitms/connectdog/core/designsystem/component/NetworkImageKt$NetworkImage$1$1.class
Binary file not shown.
Binary file added
BIN
+3.6 KB
...ug/com/kusitms/connectdog/core/designsystem/component/NetworkImageKt$NetworkImage$2.class
Binary file not shown.
Binary file added
BIN
+2.35 KB
...ug/com/kusitms/connectdog/core/designsystem/component/NetworkImageKt$NetworkImage$3.class
Binary file not shown.
Binary file added
BIN
+1.61 KB
...kusitms/connectdog/core/designsystem/component/NetworkImageKt$NetworkImagePreview$1.class
Binary file not shown.
Binary file added
BIN
+8.65 KB
...lin-classes/debug/com/kusitms/connectdog/core/designsystem/component/NetworkImageKt.class
Binary file not shown.
Binary file added
BIN
+2.71 KB
...tdog/core/designsystem/component/ReviewRecentContentKt$ConnectDogCommunityContent$2.class
Binary file not shown.
Binary file added
BIN
+4.32 KB
...tms/connectdog/core/designsystem/component/ReviewRecentContentKt$ConnectDogRecent$1.class
Binary file not shown.
Binary file added
BIN
+2.87 KB
...tms/connectdog/core/designsystem/component/ReviewRecentContentKt$ConnectDogRecent$2.class
Binary file not shown.
Binary file added
BIN
+2 KB
...tms/connectdog/core/designsystem/component/ReviewRecentContentKt$ConnectDogRecent$3.class
Binary file not shown.
Binary file added
BIN
+2.76 KB
...tms/connectdog/core/designsystem/component/ReviewRecentContentKt$ConnectDogReview$1.class
Binary file not shown.
Binary file added
BIN
+2.87 KB
...tms/connectdog/core/designsystem/component/ReviewRecentContentKt$ConnectDogReview$2.class
Binary file not shown.
Binary file added
BIN
+2 KB
...tms/connectdog/core/designsystem/component/ReviewRecentContentKt$ConnectDogReview$3.class
Binary file not shown.
Binary file added
BIN
+1.9 KB
...sitms/connectdog/core/designsystem/component/ReviewRecentContentKt$ProfileContent$2.class
Binary file not shown.
Binary file added
BIN
+1.64 KB
...connectdog/core/designsystem/component/ReviewRecentContentKt$ReviewContentPreview$1.class
Binary file not shown.
Binary file added
BIN
+29 KB
...sses/debug/com/kusitms/connectdog/core/designsystem/component/ReviewRecentContentKt.class
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
.../designsystem/src/main/java/com/kusitms/connectdog/core/designsystem/component/Content.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
package com.kusitms.connectdog.core.designsystem.component | ||
|
||
import androidx.compose.foundation.layout.Column | ||
import androidx.compose.foundation.layout.Row | ||
import androidx.compose.foundation.layout.Spacer | ||
import androidx.compose.foundation.layout.defaultMinSize | ||
import androidx.compose.foundation.layout.width | ||
import androidx.compose.material3.MaterialTheme | ||
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.res.stringResource | ||
import androidx.compose.ui.text.TextStyle | ||
import androidx.compose.ui.tooling.preview.Preview | ||
import androidx.compose.ui.unit.dp | ||
import com.kusitms.connectdog.core.designsystem.theme.ConnectDogTheme | ||
import com.kusitms.connectdog.core.designsystem.theme.Gray2 | ||
import com.kusitms.connectdog.core.designsystem.theme.Gray3 | ||
|
||
@Composable | ||
fun Content( | ||
modifier: Modifier = Modifier, | ||
textStyle: TextStyle, | ||
titleRes1: Int, | ||
titleRes2: Int, | ||
titleRes3: Int, | ||
t1Value: String, | ||
t2Value: String, | ||
t3Value: String | ||
) { | ||
Column(modifier = modifier) { | ||
TitleValue(title = stringResource(id = titleRes1), value = t1Value, style = textStyle) | ||
TitleValue(title = stringResource(id = titleRes2), value = t2Value, style = textStyle) | ||
TitleValue(title = stringResource(id = titleRes3), value = t3Value, style = textStyle) | ||
} | ||
} | ||
|
||
@Composable | ||
fun TitleValue( | ||
title: String, | ||
value: String, | ||
style: TextStyle | ||
) { | ||
Row { | ||
Text( | ||
text = title, | ||
style = style, | ||
color = Gray3, | ||
modifier = Modifier.defaultMinSize(minWidth = 35.dp) | ||
) | ||
Spacer(modifier = Modifier.width(12.dp)) | ||
Text( | ||
text = value, | ||
style = style, | ||
color = Gray2 | ||
) | ||
} | ||
} | ||
|
||
@Preview | ||
@Composable | ||
fun ContentPreview() { | ||
ConnectDogTheme { | ||
TitleValue(title = "일정", value = "23.10.19(목)", style = MaterialTheme.typography.labelLarge) | ||
} | ||
} |
61 changes: 61 additions & 0 deletions
61
...em/src/main/java/com/kusitms/connectdog/core/designsystem/component/InformationContent.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
package com.kusitms.connectdog.core.designsystem.component | ||
|
||
import androidx.compose.material3.MaterialTheme | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.res.stringResource | ||
import androidx.compose.ui.text.TextStyle | ||
import com.kusitms.connectdog.core.designsystem.R | ||
|
||
@Composable | ||
fun AnnouncementContent( | ||
date: String, | ||
organization: String, | ||
hasKennel: Boolean, | ||
style: TextStyle = MaterialTheme.typography.labelLarge | ||
) { | ||
Content( | ||
textStyle = style, | ||
titleRes1 = R.string.date, | ||
titleRes2 = R.string.organization, | ||
titleRes3 = R.string.need_kennel, | ||
t1Value = date, | ||
t2Value = organization, | ||
t3Value = if (hasKennel) stringResource(id = R.string.has_kennel) else stringResource(id = R.string.has_not_kennel) | ||
) | ||
} | ||
|
||
@Composable | ||
fun ReviewContent( | ||
date: String, | ||
location: String, | ||
organization: String, | ||
style: TextStyle = MaterialTheme.typography.labelLarge | ||
) { | ||
Content( | ||
textStyle = style, | ||
titleRes1 = R.string.date, | ||
titleRes2 = R.string.location, | ||
titleRes3 = R.string.organization, | ||
t1Value = date, | ||
t2Value = location, | ||
t3Value = organization | ||
) | ||
} | ||
|
||
@Composable | ||
fun RecentContent( | ||
date: String, | ||
location: String, | ||
volunteer: String, | ||
style: TextStyle = MaterialTheme.typography.labelLarge | ||
) { | ||
Content( | ||
textStyle = style, | ||
titleRes1 = R.string.date, | ||
titleRes2 = R.string.location, | ||
titleRes3 = R.string.volunteer, | ||
t1Value = date, | ||
t2Value = location, | ||
t3Value = volunteer | ||
) | ||
} |
47 changes: 47 additions & 0 deletions
47
...gnsystem/src/main/java/com/kusitms/connectdog/core/designsystem/component/NetworkImage.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package com.kusitms.connectdog.core.designsystem.component | ||
|
||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Alignment | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.graphics.Color | ||
import androidx.compose.ui.graphics.painter.Painter | ||
import androidx.compose.ui.graphics.toArgb | ||
import androidx.compose.ui.layout.ContentScale | ||
import androidx.compose.ui.res.painterResource | ||
import androidx.compose.ui.tooling.preview.Preview | ||
import com.skydoves.landscapist.ImageOptions | ||
import com.skydoves.landscapist.coil.CoilImage | ||
import com.skydoves.landscapist.components.rememberImageComponent | ||
import com.skydoves.landscapist.placeholder.placeholder.PlaceholderPlugin | ||
|
||
@Composable | ||
fun NetworkImage( | ||
imageUrl: String?, | ||
modifier: Modifier = Modifier, | ||
placeholder: Painter? = null, | ||
contentScale: ContentScale = ContentScale.Crop, | ||
contentDescription: String? = null | ||
) { | ||
CoilImage( | ||
imageModel = { imageUrl }, | ||
modifier = modifier, | ||
component = rememberImageComponent { | ||
+PlaceholderPlugin.Loading(placeholder) | ||
+PlaceholderPlugin.Failure(placeholder) | ||
}, | ||
imageOptions = ImageOptions( | ||
contentScale = contentScale, | ||
alignment = Alignment.Center, | ||
contentDescription = contentDescription | ||
) | ||
) | ||
} | ||
|
||
@Preview | ||
@Composable | ||
private fun NetworkImagePreview() { | ||
NetworkImage( | ||
imageUrl = "", | ||
placeholder = painterResource(id = Color(0xFFFFFFFF).toArgb()) | ||
) | ||
} |
Oops, something went wrong.