From 95d372e17d0ea7b12b16c1ae24998b7cbb3f31d7 Mon Sep 17 00:00:00 2001 From: ckstmznf Date: Tue, 15 Feb 2022 18:58:29 +0900 Subject: [PATCH] Chatting UI --- .../howtosunrin/ui/savequestion/SaveQnARecyclerHolder.kt | 6 +++--- app/src/main/res/layout/activity_group_chat.xml | 5 +---- app/src/main/res/layout/activity_save_question.xml | 2 +- app/src/main/res/layout/item_i_chat_recycleritem.xml | 3 +-- .../layout/{layout_question.xml => item_save_question.xml} | 0 app/src/main/res/layout/item_you_chat_recycleritem.xml | 4 +--- 6 files changed, 7 insertions(+), 13 deletions(-) rename app/src/main/res/layout/{layout_question.xml => item_save_question.xml} (100%) diff --git a/app/src/main/java/com/edcan/howtosunrin/ui/savequestion/SaveQnARecyclerHolder.kt b/app/src/main/java/com/edcan/howtosunrin/ui/savequestion/SaveQnARecyclerHolder.kt index 41e91a8..3e7846a 100644 --- a/app/src/main/java/com/edcan/howtosunrin/ui/savequestion/SaveQnARecyclerHolder.kt +++ b/app/src/main/java/com/edcan/howtosunrin/ui/savequestion/SaveQnARecyclerHolder.kt @@ -3,14 +3,14 @@ package com.edcan.howtosunrin.ui.savequestion import android.view.LayoutInflater import android.view.ViewGroup import androidx.recyclerview.widget.RecyclerView -import com.edcan.howtosunrin.databinding.LayoutQuestionBinding +import com.edcan.howtosunrin.databinding.ItemSaveQuestionBinding import com.edcan.howtosunrin.utill.qna.Question -class SaveQnARecyclerHolder(private val binding : LayoutQuestionBinding) +class SaveQnARecyclerHolder(private val binding : ItemSaveQuestionBinding) : RecyclerView.ViewHolder(binding.root) { constructor(parent: ViewGroup) : this( - LayoutQuestionBinding.inflate(LayoutInflater.from(parent.context), parent ,false) + ItemSaveQuestionBinding.inflate(LayoutInflater.from(parent.context), parent ,false) ) init { diff --git a/app/src/main/res/layout/activity_group_chat.xml b/app/src/main/res/layout/activity_group_chat.xml index d2f4b3f..f551066 100644 --- a/app/src/main/res/layout/activity_group_chat.xml +++ b/app/src/main/res/layout/activity_group_chat.xml @@ -30,10 +30,6 @@ android:layout_width="0dp" android:layout_height="0dp" - android:orientation="vertical" - android:backgroundTint="#f7f7f7" - - tools:listitem="@layout/item_you_chat_recycleritem" app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" app:stackFromEnd="true" @@ -73,6 +69,7 @@ android:layout_width="0dp" android:layout_height="wrap_content" + android:hint="채팅을 입력해보세요." android:text="@={viewModel.content}" android:textSize="20sp" diff --git a/app/src/main/res/layout/activity_save_question.xml b/app/src/main/res/layout/activity_save_question.xml index ea93ab0..3deec9f 100644 --- a/app/src/main/res/layout/activity_save_question.xml +++ b/app/src/main/res/layout/activity_save_question.xml @@ -33,7 +33,7 @@ app:bindSaveQnAItems="@{viewModel.saveQuestionList}" - tools:listitem="@layout/layout_question" + tools:listitem="@layout/item_save_question" app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" app:layout_constraintTop_toBottomOf="@id/toolBar_saveQnA" diff --git a/app/src/main/res/layout/item_i_chat_recycleritem.xml b/app/src/main/res/layout/item_i_chat_recycleritem.xml index d4ade89..7a19ade 100644 --- a/app/src/main/res/layout/item_i_chat_recycleritem.xml +++ b/app/src/main/res/layout/item_i_chat_recycleritem.xml @@ -15,8 +15,6 @@ @@ -28,6 +26,7 @@ android:text="@{userData.name}" tools:text="박희찬" + android:textColor="@color/EDCAN" android:textSize="12sp" android:gravity="center" diff --git a/app/src/main/res/layout/layout_question.xml b/app/src/main/res/layout/item_save_question.xml similarity index 100% rename from app/src/main/res/layout/layout_question.xml rename to app/src/main/res/layout/item_save_question.xml diff --git a/app/src/main/res/layout/item_you_chat_recycleritem.xml b/app/src/main/res/layout/item_you_chat_recycleritem.xml index 4f66910..ce76246 100644 --- a/app/src/main/res/layout/item_you_chat_recycleritem.xml +++ b/app/src/main/res/layout/item_you_chat_recycleritem.xml @@ -15,8 +15,6 @@ @@ -29,7 +27,6 @@ android:text="@{userData.name}" tools:text="바키찬" android:textSize="12sp" - android:textColor="@color/black" android:gravity="center" @@ -45,6 +42,7 @@ android:text="@{chatData.content}" tools:text="EDCAN은 정말 최고야 EDCAN은 정말 최고야 EDCAN은 정말 최고야 EDCAN은 정말 최고야 EDCAN은 정말 최고야 EDCAN은 정말 최고야" android:textSize="14sp" + android:textColor="@color/black" android:textFontWeight="400" android:background="@drawable/default_rect_round"