Skip to content

Commit

Permalink
Chatting UI
Browse files Browse the repository at this point in the history
  • Loading branch information
kichan05 committed Feb 15, 2022
1 parent 7e0f92a commit 95d372e
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
5 changes: 1 addition & 4 deletions app/src/main/res/layout/activity_group_chat.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -73,6 +69,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"

android:hint="채팅을 입력해보세요."
android:text="@={viewModel.content}"
android:textSize="20sp"

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_save_question.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/layout/item_i_chat_recycleritem.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:background="@color/white"

android:paddingHorizontal="20dp"
android:paddingVertical="5dp">
Expand All @@ -28,6 +26,7 @@

android:text="@{userData.name}"
tools:text="박희찬"
android:textColor="@color/EDCAN"
android:textSize="12sp"

android:gravity="center"
Expand Down
File renamed without changes.
4 changes: 1 addition & 3 deletions app/src/main/res/layout/item_you_chat_recycleritem.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:background="@color/white"

android:paddingHorizontal="20dp"
android:paddingVertical="5dp">
Expand All @@ -29,7 +27,6 @@
android:text="@{userData.name}"
tools:text="바키찬"
android:textSize="12sp"
android:textColor="@color/black"

android:gravity="center"

Expand All @@ -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"
Expand Down

0 comments on commit 95d372e

Please sign in to comment.