fix(live-room): 라이브룸 팔로우 버튼 룩앤필을 정렬한다

This commit is contained in:
2026-03-05 15:41:21 +09:00
parent d83c4b12ec
commit d8b2d53747
6 changed files with 73 additions and 12 deletions

View File

@@ -716,17 +716,23 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
isCreatorFollowNotifyEnabled = true
}
binding.ivCreatorFollow.setImageResource(
if (response.isFollowing) {
val followTextRes = if (response.isFollowing) {
R.string.screen_home_following
} else {
R.string.screen_home_follow
}
val followIconRes = if (response.isFollowing) {
if (isCreatorFollowNotifyEnabled) {
R.drawable.btn_following_big
R.drawable.ic_live_creator_follow_alarm
} else {
R.drawable.btn_following_no_alarm_big
R.drawable.ic_live_creator_follow_no_alarm
}
} else {
R.drawable.btn_follow_big
R.drawable.ic_live_creator_follow_plus
}
)
binding.tvCreatorFollow.text = getString(followTextRes)
binding.ivCreatorFollowIcon.setImageResource(followIconRes)
binding.ivCreatorFollow.setOnClickListener {
if (response.isFollowing) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 703 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -526,14 +526,38 @@
tools:text="999,999" />
</LinearLayout>
<ImageView
<LinearLayout
android:id="@+id/iv_creator_follow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5.3dp"
android:contentDescription="@null"
android:background="@drawable/bg_round_corner_5_3_transparent_bbbbbb"
android:gravity="center"
android:orientation="horizontal"
android:paddingHorizontal="8dp"
android:paddingVertical="5.3dp"
android:visibility="gone"
tools:src="@drawable/btn_follow_big" />
tools:ignore="RelativeOverlap">
<ImageView
android:id="@+id/iv_creator_follow_icon"
android:layout_width="14dp"
android:layout_height="14dp"
android:contentDescription="@null"
android:src="@drawable/ic_live_creator_follow_plus" />
<TextView
android:id="@+id/tv_creator_follow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="6.7dp"
android:fontFamily="@font/medium"
android:gravity="center_vertical"
android:text="@string/screen_home_follow"
android:textColor="@color/color_bbbbbb"
android:textSize="11sp"
tools:ignore="SmallSp" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_view_users"

View File

@@ -0,0 +1,31 @@
# 라이브 룸 팔로우/팔로잉 버튼 룩앤필 개선
- [x] 요구사항 정리 및 영향 파일 확인 (`LiveRoomActivity.kt`, `activity_live_room.xml`)
- [x] 팔로우/팔로잉 관련 기존 구현 및 스타일 패턴 전수 탐색
- [x] 팔로우 버튼을 텍스트 기반 UI로 변경하고 국제화 문자열 연결
- [x] 팔로우/팔로잉 상태별 아이콘(`ic_live_creator_follow_plus`, `ic_live_creator_follow_no_alarm`, `ic_live_creator_follow_alarm`) 반영
- [x] 팔로우 버튼을 하트/후원 캔과 동일 UI 구조(아이콘+텍스트)로 정렬하고 아이콘을 14x14dp로 적용
- [x] 정적 진단/테스트/빌드 검증 수행 및 결과 기록
## 검증 기록
### 2026-03-05 15:11 (KST)
- 무엇/왜/어떻게: 라이브룸 상단 우측 팔로우 버튼을 이미지 리소스(`btn_follow_*`) 기반에서 텍스트+아이콘 기반으로 변경해 같은 레벨 버튼(`ll_heart`, `ll_donation`)과 룩앤필을 맞추고, 상태별 아이콘/텍스트를 코드에서 바인딩하도록 수정했다.
- 전수 탐색: `explore` 2건 + `librarian` 2건 병렬 실행, `grep`/`ast-grep`로 내부 사용처를 확인했다. `rg`는 로컬 환경에서 명령 미설치(`command not found`)로 실행 불가였다.
- 수정 파일:
- `app/src/main/res/layout/activity_live_room.xml`
- `app/src/main/java/kr/co/vividnext/sodalive/live/room/LiveRoomActivity.kt`
- `docs/20260305_라이브룸팔로우버튼룩앤필개선.md`
- 실행 명령 및 결과:
- `./gradlew :app:testDebugUnitTest :app:assembleDebug` -> `BUILD SUCCESSFUL`
- `./gradlew :app:ktlintCheck` -> `:app:ktlintMainSourceSetCheck FAILED` (기존 `LiveRoomActivity.kt` 다수 스타일 위반으로 실패, 이번 변경 라인 외 기존 누적 이슈)
- `lsp_diagnostics` -> `.kt`/`.xml` 확장자용 LSP 서버 미구성으로 실행 불가
### 2026-03-05 15:20 (KST) - 추가 요청 반영
- 무엇/왜/어떻게: 팔로우 버튼을 하트/후원 캔 버튼과 동일한 표시 방식으로 맞추기 위해 `TextView` 단일 구조를 `LinearLayout(아이콘+텍스트)` 구조로 변경하고, 내부 아이콘 `iv_creator_follow_icon` 크기를 `14dp x 14dp`로 고정했다.
- 수정 파일:
- `app/src/main/res/layout/activity_live_room.xml`
- `app/src/main/java/kr/co/vividnext/sodalive/live/room/LiveRoomActivity.kt`
- 실행 명령 및 결과:
- `./gradlew :app:testDebugUnitTest :app:assembleDebug` -> `BUILD SUCCESSFUL`
- `lsp_diagnostics` -> `.kt`/`.xml` 확장자용 LSP 서버 미구성으로 실행 불가