Skip to content

Commit

Permalink
[UI]#24 동화 이미지 UI 수치 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
nrj022 committed Feb 21, 2024
1 parent fec4ec0 commit 25313d1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,17 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import coil.compose.AsyncImage

@Composable
fun PreviewFairytaleListItem(imgUrl: String?){
fun PreviewFairytaleListItem(imgUrl: String?, width: Dp, paddingEnd: Dp){
Surface(
modifier = Modifier
.width(360.dp)
.width(width)
.height(113.dp)
.padding(end = paddingEnd)
.clickable { },
color = Color.White,
onClick = {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class FairytaleDetailActivity : AppCompatActivity() {
binding.composeViewFairytaleRecommend.apply {
setViewCompositionStrategy(ViewCompositionStrategy.DisposeOnViewTreeLifecycleDestroyed)
setContent {
PreviewFairytaleListItem(imgUrl = detailData.recommendImageUrl)
PreviewFairytaleListItem(imgUrl = detailData.recommendImageUrl, 330.dp, 0.dp)
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/com/green/comma/ui/home/HomeFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ class HomeFragment : Fragment() {
setViewCompositionStrategy(ViewCompositionStrategy.DisposeOnViewTreeLifecycleDestroyed)
var itemCount = 2
setContent {
LazyRow(modifier = Modifier.padding(start = 20.dp)) {
LazyRow(modifier = Modifier.padding(start = 30.dp)) {
items(itemCount) { item ->
PreviewFairytaleListItem(it.top2Fairytales[item].recommendImageUrl)
PreviewFairytaleListItem(it.top2Fairytales[item].recommendImageUrl, 300.dp, 20.dp)
}
}
DisposableEffect(Unit) {
Expand Down

0 comments on commit 25313d1

Please sign in to comment.