feat(chat): 채팅방 상단 캔 배지 및 더보기 전체화면 다이얼로그 추가
- 헤더 우측에 캔 배지(tv_can_badge)와 더보기(iv_more) 추가 - 캔 배지 스타일 적용(배경 #263238, 텍스트 white, v5/h8 패딩, can 아이콘) - 더보기 클릭 시 전체화면 다이얼로그 표시(플레이스홀더 UI)
This commit is contained in:
		@@ -22,6 +22,7 @@ import kr.co.vividnext.sodalive.chat.character.detail.detail.CharacterType
 | 
			
		||||
import kr.co.vividnext.sodalive.common.SharedPreferenceManager
 | 
			
		||||
import kr.co.vividnext.sodalive.databinding.ActivityChatRoomBinding
 | 
			
		||||
import kr.co.vividnext.sodalive.extensions.dpToPx
 | 
			
		||||
import kr.co.vividnext.sodalive.extensions.moneyFormat
 | 
			
		||||
import org.koin.android.ext.android.inject
 | 
			
		||||
 | 
			
		||||
class ChatRoomActivity : BaseActivity<ActivityChatRoomBinding>(
 | 
			
		||||
@@ -73,6 +74,13 @@ class ChatRoomActivity : BaseActivity<ActivityChatRoomBinding>(
 | 
			
		||||
        // 뒤로가기 버튼 동작
 | 
			
		||||
        binding.ivBack.setOnClickListener { finish() }
 | 
			
		||||
 | 
			
		||||
        binding.tvCanBadge.text = SharedPreferenceManager.can.moneyFormat()
 | 
			
		||||
 | 
			
		||||
        // 더보기 클릭 시 전체화면 다이얼로그 표시
 | 
			
		||||
        binding.ivMore.setOnClickListener {
 | 
			
		||||
            ChatRoomMoreDialogFragment().show(supportFragmentManager, "ChatRoomMoreDialog")
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // 5.3: characterInfo가 있으면 헤더 바인딩, 없으면 기본 플레이스홀더 유지
 | 
			
		||||
        characterInfo?.let { bindHeader(it) } ?: run {
 | 
			
		||||
            // 기본값: 이름 숨김 또는 플레이스 홀더 표시
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +1,29 @@
 | 
			
		||||
package kr.co.vividnext.sodalive.chat.talk.room
 | 
			
		||||
 | 
			
		||||
import android.os.Bundle
 | 
			
		||||
import android.view.LayoutInflater
 | 
			
		||||
import android.view.View
 | 
			
		||||
import android.view.ViewGroup
 | 
			
		||||
import androidx.fragment.app.DialogFragment
 | 
			
		||||
import kr.co.vividnext.sodalive.R
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 채팅방 우측 상단 더보기 버튼 클릭 시 표시되는 전체화면 다이얼로그.
 | 
			
		||||
 * 내용은 추후 구성 예정이며 현재는 플레이스홀더 UI만 표시합니다.
 | 
			
		||||
 */
 | 
			
		||||
class ChatRoomMoreDialogFragment : DialogFragment() {
 | 
			
		||||
 | 
			
		||||
    override fun onCreate(savedInstanceState: Bundle?) {
 | 
			
		||||
        super.onCreate(savedInstanceState)
 | 
			
		||||
        // 기본 전체 화면 테마 사용 (타이틀 없음, 전체화면)
 | 
			
		||||
        setStyle(STYLE_NO_TITLE, android.R.style.Theme_Black_NoTitleBar_Fullscreen)
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    override fun onCreateView(
 | 
			
		||||
        inflater: LayoutInflater,
 | 
			
		||||
        container: ViewGroup?,
 | 
			
		||||
        savedInstanceState: Bundle?
 | 
			
		||||
    ): View? {
 | 
			
		||||
        return inflater.inflate(R.layout.fragment_chat_room_more_dialog, container, false)
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										6
									
								
								app/src/main/res/drawable/bg_can_badge.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								app/src/main/res/drawable/bg_can_badge.xml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,6 @@
 | 
			
		||||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
 | 
			
		||||
    android:shape="rectangle">
 | 
			
		||||
    <solid android:color="#263238" />
 | 
			
		||||
    <corners android:radius="30dp" />
 | 
			
		||||
</shape>
 | 
			
		||||
@@ -34,10 +34,10 @@
 | 
			
		||||
        android:id="@+id/header_container"
 | 
			
		||||
        android:layout_width="0dp"
 | 
			
		||||
        android:layout_height="60dp"
 | 
			
		||||
        android:paddingTop="4dp"
 | 
			
		||||
        android:background="@android:color/transparent"
 | 
			
		||||
        android:paddingHorizontal="16dp"
 | 
			
		||||
        android:paddingVertical="8dp"
 | 
			
		||||
        android:paddingTop="4dp"
 | 
			
		||||
        app:layout_constraintEnd_toEndOf="parent"
 | 
			
		||||
        app:layout_constraintStart_toStartOf="parent"
 | 
			
		||||
        app:layout_constraintTop_toTopOf="parent">
 | 
			
		||||
@@ -69,7 +69,7 @@
 | 
			
		||||
            android:layout_marginStart="12dp"
 | 
			
		||||
            android:orientation="vertical"
 | 
			
		||||
            app:layout_constraintBottom_toBottomOf="@+id/iv_profile"
 | 
			
		||||
            app:layout_constraintEnd_toEndOf="parent"
 | 
			
		||||
            app:layout_constraintEnd_toStartOf="@+id/ll_can_badge"
 | 
			
		||||
            app:layout_constraintStart_toEndOf="@id/iv_profile"
 | 
			
		||||
            app:layout_constraintTop_toTopOf="@id/iv_profile">
 | 
			
		||||
 | 
			
		||||
@@ -98,11 +98,55 @@
 | 
			
		||||
                android:textColor="#FFFFFFFF"
 | 
			
		||||
                android:textSize="10sp"
 | 
			
		||||
                app:layout_constraintBottom_toBottomOf="@id/iv_profile"
 | 
			
		||||
                app:layout_constraintEnd_toEndOf="parent"
 | 
			
		||||
                tools:ignore="SmallSp"
 | 
			
		||||
                tools:text="Clone" />
 | 
			
		||||
        </LinearLayout>
 | 
			
		||||
 | 
			
		||||
        <!-- 캔 배지 -->
 | 
			
		||||
        <LinearLayout
 | 
			
		||||
            android:id="@+id/ll_can_badge"
 | 
			
		||||
            android:layout_width="wrap_content"
 | 
			
		||||
            android:layout_height="wrap_content"
 | 
			
		||||
            android:layout_marginEnd="10dp"
 | 
			
		||||
            android:background="@drawable/bg_can_badge"
 | 
			
		||||
            android:gravity="center"
 | 
			
		||||
            android:orientation="horizontal"
 | 
			
		||||
            android:paddingHorizontal="10dp"
 | 
			
		||||
            android:paddingVertical="5dp"
 | 
			
		||||
            app:layout_constraintBottom_toBottomOf="parent"
 | 
			
		||||
            app:layout_constraintEnd_toStartOf="@+id/iv_more"
 | 
			
		||||
            app:layout_constraintTop_toTopOf="parent">
 | 
			
		||||
 | 
			
		||||
            <ImageView
 | 
			
		||||
                android:layout_width="20dp"
 | 
			
		||||
                android:layout_height="20dp"
 | 
			
		||||
                android:layout_marginEnd="4dp"
 | 
			
		||||
                android:contentDescription="@null"
 | 
			
		||||
                android:src="@drawable/ic_can" />
 | 
			
		||||
 | 
			
		||||
            <TextView
 | 
			
		||||
                android:id="@+id/tv_can_badge"
 | 
			
		||||
                android:layout_width="wrap_content"
 | 
			
		||||
                android:layout_height="wrap_content"
 | 
			
		||||
                android:fontFamily="@font/pretendard_regular"
 | 
			
		||||
                android:gravity="center"
 | 
			
		||||
                android:textColor="#FFFFFFFF"
 | 
			
		||||
                android:textSize="16sp"
 | 
			
		||||
                tools:text="123,456" />
 | 
			
		||||
 | 
			
		||||
        </LinearLayout>
 | 
			
		||||
 | 
			
		||||
        <!-- 더보기 버튼 -->
 | 
			
		||||
        <ImageView
 | 
			
		||||
            android:id="@+id/iv_more"
 | 
			
		||||
            android:layout_width="24dp"
 | 
			
		||||
            android:layout_height="24dp"
 | 
			
		||||
            android:contentDescription="@null"
 | 
			
		||||
            android:src="@drawable/ic_seemore_vertical_white"
 | 
			
		||||
            app:layout_constraintBottom_toBottomOf="parent"
 | 
			
		||||
            app:layout_constraintEnd_toEndOf="parent"
 | 
			
		||||
            app:layout_constraintTop_toTopOf="parent" />
 | 
			
		||||
 | 
			
		||||
    </androidx.constraintlayout.widget.ConstraintLayout>
 | 
			
		||||
 | 
			
		||||
    <!-- 안내 메시지 영역 -->
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										20
									
								
								app/src/main/res/layout/fragment_chat_room_more_dialog.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								app/src/main/res/layout/fragment_chat_room_more_dialog.xml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,20 @@
 | 
			
		||||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<androidx.constraintlayout.widget.ConstraintLayout 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"
 | 
			
		||||
    android:background="#CC000000">
 | 
			
		||||
 | 
			
		||||
    <TextView
 | 
			
		||||
        android:id="@+id/tv_placeholder"
 | 
			
		||||
        android:layout_width="wrap_content"
 | 
			
		||||
        android:layout_height="wrap_content"
 | 
			
		||||
        android:text="준비중"
 | 
			
		||||
        android:textColor="@android:color/white"
 | 
			
		||||
        android:textSize="18sp"
 | 
			
		||||
        app:layout_constraintBottom_toBottomOf="parent"
 | 
			
		||||
        app:layout_constraintEnd_toEndOf="parent"
 | 
			
		||||
        app:layout_constraintStart_toStartOf="parent"
 | 
			
		||||
        app:layout_constraintTop_toTopOf="parent" />
 | 
			
		||||
 | 
			
		||||
</androidx.constraintlayout.widget.ConstraintLayout>
 | 
			
		||||
		Reference in New Issue
	
	Block a user