2주차 미션 / 1조 김세연#14
Open
rlatpdusdlqslek-spec wants to merge 1 commit into
Open
Conversation
1hyok
reviewed
Mar 31, 2026
| val categories = listOf("All", "Sports", "Politics", "Business", "Health","Travel","Science") | ||
| items(categories) { category -> | ||
| Text(text = category, fontWeight = if (category == "All") FontWeight.Bold else FontWeight.Normal) | ||
| Spacer(modifier = Modifier.width(16.dp)) |
There was a problem hiding this comment.
마지막 요소 뒤에도 공백이 적용되기 때문에 주석 처리하신 어레인지먼트로 처리하는 것이 관리하기 좋습니다!
1hyok
reviewed
Mar 31, 2026
| Image( | ||
| painter = painterResource(id = news.image), | ||
| contentDescription = null, | ||
| modifier = Modifier.size(96.dp).padding(end = 12.dp) |
There was a problem hiding this comment.
이미지 자체에 패딩을 주면 패딩만큼 크기가 작아지기 때문에 horizontalArrangement = Arrangement.spacedBy로 대체하면 되겠습니당
1hyok
reviewed
Mar 31, 2026
| ) | ||
|
|
||
| // News Info | ||
| Column(modifier = Modifier.weight(1f)) { |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
1. 미션
각 주차에 해당하는 미션 체크리스트
📝 미션 체크리스트
2. 구현에 대한 설명
본인이 구현한 것에 대한 설명
코드 상단에서 News라는 객체를 리스트로 만들어 관리하고 있습니다.
재사용성: 뉴스 이미지, 카테고리, 제목, 언론사 로고, 이름, 시간 등 뉴스 카드 하나에 필요한 데이터를 하나의 객체로 묶어 관리함으로써, LazyColumn에서 효율적으로 데이터를 뿌려줄 수 있게 설계되었습니다.
전체 화면은 Column을 부모로 하여 위에서 아래로 흐르는 구조입니다.
Header (헤더): Row와 Arrangement.Center를 사용하여 서비스 명칭인 "Kabar"를 중앙에 배치했습니다.
Latest Section Header: "Latest"와 "See all" 텍스트를 Arrangement.SpaceBetween으로 배치하여 양 끝으로 밀어내는 전형적인 모바일 UI 패턴을 적용했습니다.
Category Tabs (카테고리 탭): LazyRow를 사용하여 가로로 스크롤 가능한 카테고리 목록을 만들었습니다. 텍스트 간의 간격(Spacer)과 특정 조건("All")에 따른 볼드체 처리가 돋보입니다.
가장 핵심적인 부분으로, 많은 양의 뉴스 아이템을 메모리 효율적으로 보여주기 위해 LazyColumn을 사용했습니다.
아이템 간격: verticalArrangement = Arrangement.spacedBy(24.dp)를 사용하여 아이템 사이의 여백을 일관되게 유지했습니다.
상세 카드 구성: * 왼쪽: 뉴스 썸네일 이미지를 배치했습니다.
오른쪽: Column에 Modifier.weight(1f)를 주어 남은 가로 공간을 모두 차지하게 했고, 그 안에 제목과 메타 정보(작성자, 시간)를 넣었습니다.
텍스트 제한: maxLines = 2를 설정하여 제목이 너무 길어져도 레이아웃이 깨지지 않도록 방어적인 코딩이 적용되었습니다.
Modifier 활용: clip(RoundedCornerShape)를 통해 언론사 로고를 둥글게 깎거나, padding을 통해 요소 간의 간격을 주는 등 디테일한 UI 요소가 잘 반영되었습니다.
3. 스크린샷 & 실행영상
실행영상이 있다면 실행영상을, 없다면 스크린샷 첨부
4. 기타
기타 문의사항이나 질문사항, 그 외 하고싶은 말