Skip to content

Commit

Permalink
카테고리 리소스 png로 변경, ui 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
leesa-l committed Nov 6, 2023
1 parent c66e28b commit fbd09e4
Show file tree
Hide file tree
Showing 34 changed files with 30 additions and 524 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Icon
import androidx.compose.material3.Switch
import androidx.compose.material3.SwitchDefaults
Expand All @@ -23,6 +24,7 @@ import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp
import com.dkin.chevit.presentation.checklist.component.ChecklistTopBar
Expand Down Expand Up @@ -66,15 +68,15 @@ fun ChecklistScreen(
Column(modifier = Modifier.fillMaxWidth(), horizontalAlignment = Alignment.CenterHorizontally) {
if (showCountryInfo) {
Icon(
modifier = Modifier.clickable { showCountryInfo = false },
modifier = Modifier.clip(RoundedCornerShape(8.dp)).clickable { showCountryInfo = false },
imageVector = ChevitIcon.IconArrowUpLine,
contentDescription = "",
tint = ChevitTheme.colors.grey10,
)
Spacer(modifier = Modifier.height(12.dp))
} else {
Icon(
modifier = Modifier.clickable { showCountryInfo = true },
modifier = Modifier.clip(RoundedCornerShape(8.dp)).clickable { showCountryInfo = true },
imageVector = ChevitIcon.IconArrowDownLine,
contentDescription = "",
tint = ChevitTheme.colors.grey10,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import coil.compose.AsyncImage
import coil.request.ImageRequest
import com.dkin.chevit.presentation.checklist.ChecklistState
import com.dkin.chevit.presentation.resource.ChevitTheme
import com.dkin.chevit.presentation.resource.util.clickableNoRipple

@OptIn(ExperimentalFoundationApi::class)
@Composable
Expand Down Expand Up @@ -57,8 +58,8 @@ fun CountryInfo(
color = ChevitTheme.colors.grey2,
shape = RoundedCornerShape(12.dp),
)
.padding(horizontal = 24.dp, vertical = 14.dp)
.clickable { onClickUrl(notice.url) }
.padding(horizontal = 24.dp, vertical = 14.dp)
) {
Notice(notice.title)
}
Expand Down Expand Up @@ -93,7 +94,7 @@ fun CountryInfo(
}
Spacer(modifier = Modifier.height(12.dp))
Text(
modifier = Modifier.clickable { onClickUrl(weatherDetailUrl) },
modifier = Modifier.clickableNoRipple { onClickUrl(weatherDetailUrl) },
text = "날씨 정보 더보기",
style = ChevitTheme.typhography.bodySmall.copy(color = ChevitTheme.colors.textCaption)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp
import com.dkin.chevit.presentation.checklist.ChecklistState
import com.dkin.chevit.presentation.resource.ChevitTheme
import com.dkin.chevit.presentation.resource.icon.ChevitIcon
import com.dkin.chevit.presentation.resource.icon.TemplateCheckOff
import com.dkin.chevit.presentation.resource.icon.TemplateCheckOn
import com.dkin.chevit.presentation.resource.icon.category.CategoryToiletries
import com.dkin.chevit.presentation.resource.util.getCategoryIcon
import com.dkin.chevit.presentation.resource.util.getCategoryIconResId

@Composable
fun CategoryListContents(
Expand All @@ -54,8 +54,8 @@ fun CategoryListContents(
modifier = Modifier
.clip(RoundedCornerShape(8.dp))
.background(color = if (completed) ChevitTheme.colors.grey0 else ChevitTheme.colors.grey1)
.padding(vertical = 12.dp, horizontal = 12.dp)
.clickable { onClickCategory(category.categoryId) },
.clickable { onClickCategory(category.categoryId) }
.padding(vertical = 12.dp, horizontal = 12.dp),
horizontalAlignment = Alignment.CenterHorizontally
) {
Box(
Expand All @@ -64,7 +64,7 @@ fun CategoryListContents(
.background(color = ChevitTheme.colors.white, shape = CircleShape),
contentAlignment = Alignment.Center
) {
Image(imageVector = category.categoryType.getCategoryIcon(), contentDescription = "")
Image(painter = painterResource(id = category.categoryType.getCategoryIconResId()), contentDescription = "")
}
Spacer(modifier = Modifier.height(6.dp))
Text(
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit fbd09e4

Please sign in to comment.