Conversation
kimdoyeon1234
left a comment
There was a problem hiding this comment.
이번 주차 과제 구현하시느라 고생 많으셨습니다! 전반적으로 Fragment 전환과 RecyclerView 구현이 매끄럽네요. 몇 가지 사소한 부분 피드백 남깁니다!
수고하셨어요!
There was a problem hiding this comment.
네이밍 하실때 아이콘이면 ic, 이미지면 img, 배경이면 bg등 앞에 붙여서 구분해주세요!
| import com.example.week2final.ProfileFragment | ||
| import com.google.android.material.bottomnavigation.BottomNavigationView |
There was a problem hiding this comment.
ProfileFragment를 com.example.week2final 패키지에서 가져오고 있습니다. 프로젝트 패키지 구조 통일을 위해 week3 내의 패키지 경로로 수정이 필요할 것 같습니다
| import androidx.fragment.app.Fragment | ||
| import com.example.week3.R | ||
|
|
||
| class CartFragment : Fragment(R.layout.fragment_cart) No newline at end of file |
There was a problem hiding this comment.
Fragment(R.layout.fragment_cart)) 이후에 중괄호 { } 및 내부 로직 구현이 누락된 것 같습니다. 파일 끝부분 확인 부탁드려요!
| override fun onProductClick(productName: String, price: String) { | ||
| val purchaseFragment = PurchaseFragment() | ||
|
|
||
| parentFragmentManager.beginTransaction() | ||
| .replace(R.id.main_container, purchaseFragment) | ||
| .addToBackStack(null) // 뒤로가기 버튼 지원 | ||
| .commit() | ||
| } | ||
| } No newline at end of file |
There was a problem hiding this comment.
(parentFragmentManager.beginTransaction()...)이 HomeFragment.kt 와 WishlistFragment.kt두 파일에서 동일하게 사용되고 있습니다. 코드 중복을 줄이기 위해 MainActivity에 replaceFragment() 같은 공통 메서드를 만들어서 호출하는 방식이 좋을거 같습니다!
| <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
| android:layout_width="220dp" | ||
| android:layout_height="wrap_content" | ||
| android:orientation="vertical" | ||
| android:padding="8dp" |
There was a problem hiding this comment.
현재 루트 레이아웃의 layout_width가 220dp로 고정되어 있습니다. 가로 모드나 화면 크기가 작은 기기에서 UI가 깨질 수 있으니, 상황에 따라 match_parent나 0dp(weight) 등을 활용해 유연하게 대응하도록 수정하면 더 좋을 것 같습니다
| <?xml version="1.0" encoding="utf-8"?> | ||
| <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
| xmlns:app="http://schemas.android.com/apk/res-auto" | ||
| android:layout_width="match_parent" | ||
| android:layout_height="match_parent"> | ||
|
|
||
| <com.google.android.material.bottomnavigation.BottomNavigationView | ||
| android:id="@+id/bottom_navigation" | ||
| android:layout_width="match_parent" | ||
| android:layout_height="60dp" | ||
| android:layout_alignParentBottom="true" | ||
| android:background="@android:color/white" | ||
| app:itemIconTint="@color/black" | ||
| app:itemTextColor="@color/black" | ||
| app:labelVisibilityMode="labeled" | ||
| app:menu="@menu/menu_bottom_nav" /> | ||
|
|
||
| <View | ||
| android:id="@+id/divider" | ||
| android:layout_width="match_parent" | ||
| android:layout_height="1dp" | ||
| android:layout_above="@id/bottom_navigation" | ||
| android:background="#DDDDDD" /> | ||
|
|
||
| <FrameLayout | ||
| android:id="@+id/main_container" | ||
| android:layout_width="match_parent" | ||
| android:layout_height="match_parent" | ||
| android:layout_above="@id/divider" /> | ||
|
|
||
| </RelativeLayout> No newline at end of file |
There was a problem hiding this comment.
현재 RelativeLayout 내에서 main_container가 match_parent로 설정되어 있고 layout_above를 사용 중인데, 이 경우 전체 화면을 덮어버리거나 하단 바와의 경계가 모호해질 수 있습니다. 뷰의 계층 구조를 명확히 하고 성능을 최적화하기 위해 LinearLayout이나 ConstraintLayout으로 전환하는 것을 추천드립니다...
📌 PR 제목
3주차 미션
🔗 관련 이슈
Closes #이슈번호
✨ 변경 사항
홈 화면: 중앙 배너 하단에 Horizontal RecyclerView를 배치하여 조던 시리즈 상품들 구현
구매하기 화면: 탭 레이아웃 아래에 socks.png를 포함한 상품의 상세 정보를 RecyclerView의 데이터 바인딩 구조로 설계
위시리스트 화면: 홈 화면과 동일한 어댑터 구조를 재사용해 상세 페이지 이동 기능을 일관성 있게 적용
🔍 테스트
테스트 완료
에러 없음
📸 스크린샷 (선택)
🚨 추가 이슈