feat(ui): 톡 탭
- api, viewmodel, repository 연결 - 채팅방 리스트 UI 추가
This commit is contained in:
@@ -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="#009D68" />
|
||||
<corners android:radius="6dp" />
|
||||
</shape>
|
||||
@@ -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="#0020C9" />
|
||||
<corners android:radius="6dp" />
|
||||
</shape>
|
||||
@@ -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="#F86660" />
|
||||
<corners android:radius="6dp" />
|
||||
</shape>
|
||||
@@ -5,15 +5,14 @@
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/black">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="톡 탭"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp"
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_talk"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:clipToPadding="false"
|
||||
android:padding="24dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
92
app/src/main/res/layout/item_talk.xml
Normal file
92
app/src/main/res/layout/item_talk.xml
Normal file
@@ -0,0 +1,92 @@
|
||||
<?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="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/black"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 프로필 이미지 -->
|
||||
<ImageView
|
||||
android:id="@+id/iv_profile"
|
||||
android:layout_width="76dp"
|
||||
android:layout_height="76dp"
|
||||
android:background="@color/color_777777"
|
||||
android:contentDescription="@null"
|
||||
android:scaleType="centerCrop" />
|
||||
|
||||
<!-- 텍스트 영역 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="13dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 상단 영역: 캐릭터 이름 + 유형 배지 + 시간 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 왼쪽 영역: 캐릭터 이름 + 유형 배지 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 캐릭터 이름 -->
|
||||
<TextView
|
||||
android:id="@+id/tv_character_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/pretendard_bold"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
tools:text="정인이" />
|
||||
|
||||
<!-- 캐릭터 유형 배지 -->
|
||||
<TextView
|
||||
android:id="@+id/tv_character_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:background="@drawable/bg_character_type_badge_character"
|
||||
android:fontFamily="@font/pretendard_regular"
|
||||
android:paddingHorizontal="5dp"
|
||||
android:paddingVertical="1dp"
|
||||
android:textColor="#D9FCF4"
|
||||
android:textSize="12sp"
|
||||
tools:text="Character" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 시간 -->
|
||||
<TextView
|
||||
android:id="@+id/tv_last_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/pretendard_regular"
|
||||
android:textColor="#78909C"
|
||||
android:textSize="12sp"
|
||||
tools:text="6월 15일" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 마지막 대화 내용 -->
|
||||
<TextView
|
||||
android:id="@+id/tv_last_message"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="@font/pretendard_regular"
|
||||
android:maxLines="2"
|
||||
android:textColor="@color/color_b0bec5"
|
||||
android:textSize="14sp"
|
||||
tools:text="태풍온다잖아 ㅜㅜ\n조심해 어디 나가지 말고 집에만..." />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
Reference in New Issue
Block a user