fix(profile): 프로필 후원 랭킹 왕관 UI 위치와 크기를 통일한다
This commit is contained in:
@@ -14,7 +14,7 @@ class UserProfileDonationAdapter : RecyclerView.Adapter<UserProfileDonationAdapt
|
||||
|
||||
val items = mutableListOf<UserDonationRankingResponse>()
|
||||
|
||||
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<UserProfileDonationAdapt
|
||||
|
||||
when (position) {
|
||||
0 -> {
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,20 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="76dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="76dp"
|
||||
android:layout_height="76dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:contentDescription="@null" />
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="87.5dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_profile"
|
||||
@@ -26,10 +20,10 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_crown"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_gravity="center"
|
||||
android:contentDescription="@null" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
39
docs/20260317_프로필후원순위왕관UI동일화.md
Normal file
39
docs/20260317_프로필후원순위왕관UI동일화.md
Normal file
@@ -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 검증으로 대체)
|
||||
Reference in New Issue
Block a user