feat: 9주차 미션_제로#64
Conversation
| private fun QuickMenuSection() { | ||
| val items = listOf( | ||
| QuickMenuItem(R.drawable.ic_order, "주문"), | ||
| QuickMenuItem(R.drawable.ic_identificationcard, "패스"), | ||
| QuickMenuItem(R.drawable.ic_event, "이벤트"), | ||
| QuickMenuItem(R.drawable.ic_setting, "설정") | ||
| ) | ||
|
|
||
| Row( | ||
| modifier = Modifier | ||
| .fillMaxWidth() | ||
| .height(IntrinsicSize.Min) | ||
| .padding(vertical = 20.dp) | ||
| ) { | ||
| items.forEachIndexed { index, item -> | ||
| if (index > 0) { | ||
| VerticalDivider( | ||
| modifier = Modifier | ||
| .fillMaxHeight() | ||
| .padding(vertical = 4.dp), | ||
| color = colorResource(id = R.color.border_gray) | ||
| ) | ||
| } | ||
| Column( | ||
| modifier = Modifier.weight(1f), | ||
| horizontalAlignment = Alignment.CenterHorizontally, | ||
| verticalArrangement = Arrangement.Center | ||
| ) { | ||
| Icon( | ||
| painter = painterResource(id = item.iconRes), | ||
| contentDescription = item.label, | ||
| modifier = Modifier.size(26.dp), | ||
| tint = Color.Unspecified | ||
| ) | ||
| Spacer(modifier = Modifier.height(4.dp)) | ||
| Text( | ||
| text = item.label, | ||
| fontSize = 12.sp, | ||
| color = colorResource(id = R.color.nike_black) | ||
| ) | ||
| } | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
아이콘과 글씨 크기들을 더 키워도 좋을 것 같아요!
| @@ -1 +1 @@ | |||
| package com.example.week2 | |||
There was a problem hiding this comment.
저는 MainActivity 에 모든 스크린을 몰아넣었는데, 제로님은 분리해서 작성한 점이 가독성을 높이는 것 같습니다.
| interface ReqResService { | ||
| @GET("api/users/{id}") | ||
| suspend fun getUser( | ||
| @Path("id") id: Int, | ||
| @Header("x-api-key") apiKey: String = BuildConfig.REQRES_API_KEY | ||
| ): Response<UserResponse> | ||
|
|
||
| @GET("api/users") | ||
| suspend fun getUsers( | ||
| @Query("page") page: Int = 1, | ||
| @Header("x-api-key") apiKey: String = BuildConfig.REQRES_API_KEY | ||
| ): Response<UserListResponse> | ||
| } |
There was a problem hiding this comment.
ReqRes API 호출부를 getUser, getUsers로 분리하신거 좋아요!
There was a problem hiding this comment.
ApiClient를 활용한 Retrofit 싱글톤 구조와 API Key 헤더 주입을 정석대로 구현하셨고, WishlistScreen에서 ProductGrid를 재사용하여 깔끔한 UI를 구성해주신 점 좋았습니다!
다만, 미션의 핵심인 비동기 데이터 수집 및 상태 동기화 과정에서 화면 전환 시 HorizontalPager와 pagerState.targetPage를 연동한 부드러운 스와이프 인터랙션이 누락되지 않았는지 다시 한번 점검해주세요! 이미지 로딩 시 AsyncImage 접근성(contentDescription = null) 처리와 위시리스트가 빌 때의 Empty UI 대응도 함께 신경 써주시면 좋습니다!
수고하셨습니다! 크게 수정할 부분은 없어서 좋았고, 지금도 잘 돌아가지만 수정하면 더 좋은 UI/UX가 될만한 점 남겨 두었으니 확인해주세요! 화이팅
There was a problem hiding this comment.
ProductGrid 컴포넌트를 별도로 분리하여 재사용하고, ViewModel의 위시리스트 상태를 바인딩하여 화면을 깔끔하게 구성해주신 점 좋습니다!
다만, 현재 ProductGrid 내부에서 Coil의 AsyncImage 등을 사용해 상품 이미지를 로드하고 있다면, 미션 핵심 체크리스트였던 접근성 설정(contentDescription = null)이 잘 적용되어 있는지 함께 점검해보시면 좋습니다. 또한, 위시리스트가 완전히 비어있을 때의 Empty View 처리를 추가해주시면 사용자 경험(UX) 측면에서 완성도가 훨씬 올라갑니다!
📌 feat: 9주차 미션_제로
🔗 관련 이슈
Closes #62
✨ 변경 사항
ReqRes API를 활용해 유저 1번의 프로필 정보를 불러옵니다.
HorizontalPager(
state = pagerState,
pageSize = PageSize.Fixed(90.dp), // 한 화면에 여러 유저가 보임
contentPadding = PaddingValues(horizontal = 20.dp),
pageSpacing = 8.dp
) { page ->
FollowingAvatar(user = following[page]) // 원형 이미지 + 이름
}
PageSize.Fixed로 각 페이지 너비를 고정해 한 화면에 4개의 유저가 동시에 보이며, 스와이프로 다음 유저로 이동합니다.
API 키를 소스코드에 하드코딩하지 않고 local.properties + BuildConfig로 관리합니다.
🔍 테스트
📸 스크린샷 (선택)
🚨 추가 이슈