From 76c45b62d75fddf6b71274bc0ec81a6723d44ff2 Mon Sep 17 00:00:00 2001 From: klaus Date: Tue, 17 Mar 2026 15:55:48 +0900 Subject: [PATCH] =?UTF-8?q?fix(profile):=20=ED=94=84=EB=A1=9C=ED=95=84=20?= =?UTF-8?q?=ED=9B=84=EC=9B=90=20=EB=9E=AD=ED=82=B9=20=EC=99=95=EA=B4=80=20?= =?UTF-8?q?UI=20=EC=9C=84=EC=B9=98=EC=99=80=20=ED=81=AC=EA=B8=B0=EB=A5=BC?= =?UTF-8?q?=20=ED=86=B5=EC=9D=BC=ED=95=9C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../donation/UserProfileDonationAdapter.kt | 19 ++------- .../res/layout/item_user_profile_donation.xml | 20 ++++------ docs/20260317_프로필후원순위왕관UI동일화.md | 39 +++++++++++++++++++ 3 files changed, 50 insertions(+), 28 deletions(-) create mode 100644 docs/20260317_프로필후원순위왕관UI동일화.md diff --git a/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/donation/UserProfileDonationAdapter.kt b/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/donation/UserProfileDonationAdapter.kt index 58e55e55..3eab7bd9 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/donation/UserProfileDonationAdapter.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/donation/UserProfileDonationAdapter.kt @@ -14,7 +14,7 @@ class UserProfileDonationAdapter : RecyclerView.Adapter() - inner class ViewHolder( + class ViewHolder( private val binding: ItemUserProfileDonationBinding ) : RecyclerView.ViewHolder(binding.root) { fun bind(item: UserDonationRankingResponse, position: Int) { @@ -28,32 +28,21 @@ class UserProfileDonationAdapter : RecyclerView.Adapter { - binding.ivBg.setImageResource(R.drawable.bg_circle_ffdc00_ffb600) - binding.ivBg.visibility = View.VISIBLE - - binding.ivCrown.setImageResource(R.drawable.ic_crown_1) + binding.ivCrown.setImageResource(R.drawable.img_rank_1) binding.ivCrown.visibility = View.VISIBLE } 1 -> { - binding.ivBg.setImageResource(R.drawable.bg_circle_ffffff_9f9f9f) - binding.ivBg.visibility = View.VISIBLE - - binding.ivCrown.setImageResource(R.drawable.ic_crown_2) + binding.ivCrown.setImageResource(R.drawable.img_rank_2) binding.ivCrown.visibility = View.VISIBLE } 2 -> { - binding.ivBg.setImageResource(R.drawable.bg_circle_e6a77a_c67e4a) - binding.ivBg.visibility = View.VISIBLE - - binding.ivCrown.setImageResource(R.drawable.ic_crown_3) + binding.ivCrown.setImageResource(R.drawable.img_rank_3) binding.ivCrown.visibility = View.VISIBLE } else -> { - binding.ivBg.setImageResource(0) - binding.ivBg.visibility = View.GONE binding.ivCrown.visibility = View.GONE } } diff --git a/app/src/main/res/layout/item_user_profile_donation.xml b/app/src/main/res/layout/item_user_profile_donation.xml index 0f2cd203..27594945 100644 --- a/app/src/main/res/layout/item_user_profile_donation.xml +++ b/app/src/main/res/layout/item_user_profile_donation.xml @@ -1,20 +1,14 @@ - - + android:layout_width="90dp" + android:layout_height="87.5dp"> diff --git a/docs/20260317_프로필후원순위왕관UI동일화.md b/docs/20260317_프로필후원순위왕관UI동일화.md new file mode 100644 index 00000000..573d3c29 --- /dev/null +++ b/docs/20260317_프로필후원순위왕관UI동일화.md @@ -0,0 +1,39 @@ +# 20260317_프로필후원순위왕관UI동일화.md + +## 개요 +- `UserProfileDonationAdapter`의 순위 왕관 표시 UI를 `CreatorRankingAdapter`의 랭킹 배지 UI와 동일한 리소스/표시 방식으로 맞춘다. + +## 작업 내용 +- [x] `UserProfileDonationAdapter.kt`의 순위 UI 로직을 `img_rank_1`, `img_rank_2`, `img_rank_3` 기반으로 변경 +- [x] 기존 원형 배경(`iv_bg`) 및 왕관 아이콘(`ic_crown_*`) 노출 로직 제거 +- [x] `item_user_profile_donation.xml`에서 `iv_crown` 위치를 중앙 고정으로 변경 +- [x] `item_user_profile_donation.xml`에서 `iv_crown` 크기를 `match_parent`로 조정하고 `fitCenter` 적용 +- [x] `UserProfileDonationAdapter.kt`에서 런타임 `LayoutParams` 위치 세팅 코드 제거 +- [x] 검증 수행 (`lsp_diagnostics`, `./gradlew :app:testDebugUnitTest`, `./gradlew :app:assembleDebug`) + +## 검증 기록 +- 무엇을: 유저 프로필 후원 랭킹의 상위 3위 왕관 표시 UI를 홈 크리에이터 랭킹 배지와 동일 리소스로 변경 +- 왜: 화면 간 순위 표현의 일관성을 맞추기 위함 +- 어떻게: + - `UserProfileDonationAdapter.kt`에서 상위 3위 리소스를 `img_rank_1~3`로 교체 + - `iv_bg`는 항상 `GONE` 처리하고 `iv_crown`을 중앙 정렬하여 배지 오버레이 방식으로 통일 + - `lsp_diagnostics` 시도(현재 환경은 Kotlin LSP 미구성), Gradle 테스트/빌드로 컴파일 및 동작 가능 여부 확인 +- 결과: + - `app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/donation/UserProfileDonationAdapter.kt` 반영 완료 + - `./gradlew :app:testDebugUnitTest` 성공 + - `./gradlew :app:assembleDebug` 성공 + - LSP 진단은 `.kt` 서버 미설정으로 미실행(대신 Gradle 검증으로 대체) + +### 추가 수정 (왕관 위치/크기) +- 무엇을: 왕관 배지의 위치를 XML 고정으로 전환하고 배지 크기를 조정 +- 왜: 바인딩마다 위치를 재설정하는 중복 코드를 제거하고, 프로필 이미지가 배지 밖으로 보이는 문제를 방지하기 위함 +- 어떻게: + - `item_user_profile_donation.xml`의 `iv_crown`을 `layout_centerInParent="true"`, `layout_width/height="match_parent"`, `scaleType="fitCenter"`로 수정 + - `UserProfileDonationAdapter.kt`에서 `RelativeLayout.LayoutParams`를 조작하던 코드와 import 제거 + - `lsp_diagnostics` 재시도(현재 환경은 `.kt`, `.xml` LSP 미구성), Gradle 테스트/빌드 재검증 +- 결과: + - `app/src/main/res/layout/item_user_profile_donation.xml` 반영 완료 + - `app/src/main/java/kr/co/vividnext/sodalive/explorer/profile/donation/UserProfileDonationAdapter.kt` 반영 완료 + - `./gradlew :app:testDebugUnitTest` 성공 + - `./gradlew :app:assembleDebug` 성공 + - LSP 진단은 `.kt`, `.xml` 서버 미설정으로 미실행(대신 Gradle 검증으로 대체)