Skip to content

feat: 4주차 미션_우가#35

Open
sua710 wants to merge 4 commits intomainfrom
wooga-m4
Open

feat: 4주차 미션_우가#35
sua710 wants to merge 4 commits intomainfrom
wooga-m4

Conversation

@sua710
Copy link
Copy Markdown
Collaborator

@sua710 sua710 commented Apr 8, 2026

📌 PR 제목

🔗 관련 이슈

Closes #이슈번호

✨ 변경 사항

  • 기능1 추가
  • UI 수정
  • 버그 수정

🔍 테스트

  • 테스트 완료
  • 에러 없음

📸 스크린샷 (선택)

🚨 추가 이슈

@sua710 sua710 changed the title Wooga m4 feat: 4주차 미션_우가 Apr 8, 2026
Copy link
Copy Markdown
Collaborator

@kimdoyeon1234 kimdoyeon1234 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다! @@@꼭 다른주차 피드백 확인해주세요!@@@

pr내용은 꼭 적으셔야 합니다

전체적으로 ListAdapter를 상속받으면서도 내부 리스트를 수동으로 관리하거나 notifyDataSetChanged()를 사용하는 등 라이브러리의 의도와 다르게 작성된 부분들이 보입니다...

또한, 데이터 모델 변환 로직이 프래그먼트에 직접 노출되어 있어 유지보수 효율이 떨어질 수 있으니, 매퍼도입이나 리포지토리 로직 개선을 통해 프래그먼트의 책임을 줄여보시면 좋을 것 같습니다. 사소한 버그(Activity/Fragment 혼용)와 하드코딩된 문자열들만 정리하면 훨씬 수준 높은 코드가 될 것 같습니다

고생 많으셨어요!

Comment on lines +12 to +34
class ProductDetailActivity : Fragment() {

override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
val view = inflater.inflate(R.layout.fragment_product_detail, container, false)

val detailImage = view.findViewById<ImageView>(R.id.detailImage)
val detailName = view.findViewById<TextView>(R.id.detailName)
val detailPrice = view.findViewById<TextView>(R.id.detailPrice)

val name = arguments?.getString("name") ?: ""
val price = arguments?.getString("price") ?: ""
val imageResId = arguments?.getInt("image") ?: R.drawable.home_banner

detailImage.setImageResource(imageResId)
detailName.text = name
detailPrice.text = price

return view
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ProductDetailActivity.kt 파일에서 이름은 Activity이지만 실제로는 Fragment를 상속받고 있습니다. HomeFragment에서는 이를 Intent로 실행하려 하고 있어 런타임 에러가 발생할 것으로 보입니다. 실제 Activity로 선언하거나, Navigation Component를 활용해 Fragment 간 이동으로 통일해야 합니다..

Comment on lines +17 to +25
inner class ProductViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
val imgProduct: ImageView = itemView.findViewById(R.id.imgProduct)
val imgLike: ImageView = itemView.findViewById(R.id.imgLike)
val tvBestSeller: TextView = itemView.findViewById(R.id.tvBestSeller)
val tvName: TextView = itemView.findViewById(R.id.tvName)
val tvDescription: TextView = itemView.findViewById(R.id.tvDescription)
val tvColorCount: TextView = itemView.findViewById(R.id.tvColorCount)
val tvPrice: TextView = itemView.findViewById(R.id.tvPrice)
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

findviewByid방식 뷰바인딩으로 꼭 바꿔주세요!!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants