Conversation
There was a problem hiding this comment.
수고하셨습니다! 전체적으로 깔끔한 코드입니다!
또한 사진 올리실때 밑에 바텀네비도 같이 찍어서 올려주세요! 표는 한줄에 두개 정도의 이미지가 적당한거 같습니다!
현재 기능 동작에는 문제가 없지만, 위시리스트 클릭 시 데이터 상태 유지(Persistence) 문제나 하드코딩된 리소스 등 몇 가지 개선하면 좋을 포인트들을 코드 줄에 상세히 남겨두었으니 한 번 확인해 주세요! 특히 하트 아이콘은 텍스트보다 ImageView와 Tint를 활용해 분리해 보는 방식을 추천드립니다. 고생 많으셨습니다! 🤓
There was a problem hiding this comment.
접두어가 붙어있지 않은 이미지들이 보입니다! img_ 나 ic_등 붙여서 네이밍해주세요!
| android:text="The Nike Everyday Plus Cushioned Socks bring comfort to your workout with extra cushioning under the heel and forefoot and a snug, supportive arch band. Sweat-wicking power and breathability up top help keep your feet dry and cool to help push you through that extra set." | ||
| android:textColor="@android:color/black" |
There was a problem hiding this comment.
이것도 string.xml에 옮겨주세요!
| private fun updateWishlistButton(isWishlisted: Boolean) { | ||
| if (isWishlisted) { | ||
| binding.btnWishlist.text = "위시리스트 ❤️" | ||
| } else { | ||
| binding.btnWishlist.text = "위시리스트 ♡" | ||
| } |
There was a problem hiding this comment.
현재 텍스트에 이모지를 직접 결합하는 방식 대신, TextView와 ImageView를 분리하는 구조도 좋아보입니다!
하트 아이콘을 Vector Asset으로 추가하고, ColorStateList(Selector)를 만들어 android:tint 속성에 적용해 보세요! 이렇게 하면 코드에서 일일이 텍스트를 갈아끼울 필요 없이, 뷰의 isSelected 상태만 바꿔주는 것으로 하트 색상을 제어할 수 있어 로직이 훨씬 간결해집니다
|
|
||
| import java.io.Serializable | ||
|
|
||
| data class Product( | ||
| val id: Int, | ||
| val name: String, | ||
| val description: String, | ||
| val price: String, | ||
| val imageResId: Int, | ||
| var isWishlisted: Boolean = false, | ||
| val category: String = "" | ||
| ) : Serializable |
There was a problem hiding this comment.
현재 Serializable을 사용 중인데, 안드로이드 환경에서는 직렬화/역직렬화 속도가 더 빠른 Parcelable 인터페이스 구현도 고려하면은 좋을거 같습니다! 단점이 적고 장점이 많아요!
📌 feat: 3주차 미션_제로
추후에 업뎃하겠습니다
🔗 관련 이슈
Closes #20
✨ 변경 사항
🔍 테스트
📸 스크린샷 (선택)
🚨 추가 이슈