Skip to content

Commit

Permalink
feat: 채팅뷰 가로모드 대응 (#612)
Browse files Browse the repository at this point in the history
* feat: 채팅 뷰 가로 모드 대응

* feat: 채팅방 목록 title 길이 대응

* refactor: 이름 변경
  • Loading branch information
chaehyuns authored and fromitive committed Nov 28, 2024
1 parent f23f23d commit 181ef1a
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 67 deletions.
22 changes: 11 additions & 11 deletions android/app/src/main/res/layout/activity_comment_detail.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
android:layout_marginStart="@dimen/margin_10"
android:layout_marginTop="@dimen/margin_20"
android:contentDescription="@string/comment_detail"
app:debouncedOnClick="@{() -> vm.onBackClick()}"
android:padding="@dimen/margin_10"
android:src="@drawable/btn_left_vector"
app:debouncedOnClick="@{() -> vm.onBackClick()}"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

Expand Down Expand Up @@ -74,7 +74,7 @@
app:layout_constraintTop_toTopOf="@id/tv_title_text" />

<View
android:id="@+id/white_round_view"
android:id="@+id/view_white_round"
android:layout_width="match_parent"
android:layout_height="@dimen/size_130"
android:layout_marginTop="@dimen/margin_20"
Expand All @@ -92,7 +92,7 @@
android:scaleType="centerCrop"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/white_round_view"
app:layout_constraintTop_toTopOf="@id/view_white_round"
app:offeringsStatusImageUrl="@{vm.commentOfferingInfo.imageUrl}" />

<View
Expand All @@ -101,8 +101,8 @@
android:layout_height="@dimen/size_1"
android:background="@color/gray_100"
android:translationZ="1dp"
app:layout_constraintStart_toStartOf="@+id/white_round_view"
app:layout_constraintTop_toBottomOf="@id/white_round_view" />
app:layout_constraintStart_toStartOf="@+id/view_white_round"
app:layout_constraintTop_toBottomOf="@id/view_white_round" />

<TextView
android:id="@+id/tv_update_status"
Expand All @@ -112,14 +112,14 @@
android:elevation="5dp"
android:fontFamily="@font/suit_semibold"
android:gravity="center"
app:debouncedOnClick="@{() -> vm.updateOfferingEvent()}"
android:text="@{vm.commentOfferingInfo.buttonText}"
android:textColor="@color/white"
android:textSize="@dimen/size_15"
app:debouncedOnClick="@{() -> vm.updateOfferingEvent()}"
app:isVisible="@{vm.commentOfferingInfo.isProposer}"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/white_round_view"
app:layout_constraintTop_toBottomOf="@+id/view_white_round"
app:layout_constraintWidth_percent="0.5"
tools:text="인원확정" />

Expand All @@ -128,8 +128,8 @@
android:layout_width="match_parent"
android:layout_height="@dimen/size_36"
android:background="@color/gray_100"
app:debouncedOnClick="@{() -> vm.toggleCollapsibleView()}"
android:translationZ="1dp"
app:debouncedOnClick="@{() -> vm.toggleCollapsibleView()}"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_update_status"
Expand Down Expand Up @@ -281,9 +281,9 @@
android:id="@+id/iv_send_comment"
android:layout_width="@dimen/size_50"
android:layout_height="@dimen/size_44"
app:debouncedOnClick="@{() -> vm.postComment()}"
android:padding="@dimen/margin_10"
android:src="@drawable/btn_comment_detail_send"
app:debouncedOnClick="@{() -> vm.postComment()}"
app:layout_constraintBottom_toBottomOf="@id/et_comment"
app:layout_constraintEnd_toEndOf="@id/et_comment"
app:layout_constraintTop_toTopOf="@id/et_comment" />
Expand All @@ -309,8 +309,8 @@
android:layout_width="@dimen/icon_size_24"
android:layout_height="@dimen/icon_size_24"
android:layout_marginEnd="@dimen/margin_20"
app:debouncedOnClick="@{() -> vm.onClickReport()}"
android:src="@drawable/ic_detail_report"
app:debouncedOnClick="@{() -> vm.onClickReport()}"
app:layout_constraintBottom_toBottomOf="@id/tv_offering_members"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/tv_offering_members" />
Expand Down Expand Up @@ -391,8 +391,8 @@
android:layout_width="@dimen/icon_size_24"
android:layout_height="@dimen/icon_size_24"
android:layout_marginStart="@dimen/margin_20"
app:debouncedOnClick="@{() -> vm.onExitClick()}"
android:src="@drawable/btn_exit"
app:debouncedOnClick="@{() -> vm.onExitClick()}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/horizon_line" />
Expand Down
67 changes: 39 additions & 28 deletions android/app/src/main/res/layout/item_comment_room_participant.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">

<data>

Expand All @@ -13,59 +15,68 @@
</data>


<androidx.constraintlayout.widget.ConstraintLayout xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="80dp"
app:debouncedOnClick="@{() -> onCommentRoomClickListener.onClick(commentRoom.id, commentRoom.title)}">

<ImageView
android:id="@+id/iv_profile"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="25dp"
android:layout_marginTop="18dp"
android:layout_width="@dimen/size_48"
android:layout_height="@dimen/size_48"
android:layout_marginStart="@dimen/size_25"
android:layout_marginTop="@dimen/size_18"
android:src="@drawable/img_profile"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/tv_offering_title"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="13dp"
android:layout_marginTop="20dp"
android:layout_marginStart="@dimen/size_13"
android:layout_marginTop="@dimen/size_3"
android:ellipsize="end"
android:fontFamily="@font/suit_medium"
android:maxLines="1"
android:text="@{commentRoom.title}"
android:textColor="@color/black_900"
android:textSize="16sp"
app:layout_constraintStart_toEndOf="@id/iv_profile"
app:layout_constraintTop_toTopOf="parent"
tools:text="공구 제목 이름이 들어가요" />
android:textSize="@dimen/size_15"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintEnd_toStartOf="@id/tv_last_comment_time"
app:layout_constraintStart_toEndOf="@+id/iv_profile"
app:layout_constraintTop_toTopOf="@+id/iv_profile"
tools:text="엄청나게 긴 제목이 들어가는 것을 표현하는 중 입니다" />

<TextView
android:id="@+id/tv_offering_description"
android:id="@+id/tv_last_comment_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:textColor="@color/gray_900"
app:formattedAmPmTime="@{commentRoom.latestCommentTime}"
app:layout_constraintBottom_toBottomOf="@+id/tv_offering_title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/tv_offering_title"
app:layout_constraintTop_toTopOf="@id/tv_offering_title"
tools:text="오전 10:33" />

<TextView
android:id="@+id/tv_offering_description"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="3.25dp"
android:layout_marginEnd="@dimen/margin_10"
android:ellipsize="end"
android:fontFamily="@font/suit_medium"
android:maxLines="1"
android:text="@{commentRoom.latestComment}"
android:textColor="@color/gray_500"
android:textSize="14dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@id/tv_offering_title"
app:layout_constraintTop_toBottomOf="@id/tv_offering_title"
tools:text="물품에 대해 설명 드릴게요." />

<TextView
android:id="@+id/tv_last_comment_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="18dp"
android:textColor="@color/gray_900"
app:formattedAmPmTime="@{commentRoom.latestCommentTime}"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/tv_offering_title"
tools:text="오전 10:33" />
tools:text="물품에 대해 설명 드릴게요. 물품에 대해 설명 드릴게요. 물품에 대해 설명 드릴게요. " />

<View
android:id="@+id/view_divide_line"
Expand All @@ -76,4 +87,4 @@
app:layout_constraintStart_toStartOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
</layout>
68 changes: 40 additions & 28 deletions android/app/src/main/res/layout/item_comment_room_proposer.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">

<data>

Expand All @@ -12,59 +14,69 @@
type="com.zzang.chongdae.presentation.view.comment.adapter.OnCommentRoomClickListener" />
</data>

<androidx.constraintlayout.widget.ConstraintLayout xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="80dp"
app:debouncedOnClick="@{() -> onCommentRoomClickListener.onClick(commentRoom.id, commentRoom.title)}">

<ImageView
android:id="@+id/iv_profile"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="25dp"
android:layout_marginTop="18dp"
android:layout_width="@dimen/size_48"
android:layout_height="@dimen/size_48"
android:layout_marginStart="@dimen/size_25"
android:layout_marginTop="@dimen/size_18"
android:src="@drawable/ic_comment_room_proposer"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/tv_offering_title"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="13dp"
android:layout_marginTop="20dp"
android:layout_marginStart="@dimen/size_13"
android:layout_marginTop="@dimen/size_3"
android:ellipsize="end"
android:fontFamily="@font/suit_medium"
android:maxLines="1"
android:text="@{commentRoom.title}"
android:textColor="@color/black_900"
android:textSize="16sp"
app:layout_constraintStart_toEndOf="@id/iv_profile"
app:layout_constraintTop_toTopOf="parent"
tools:text="공구 제목 이름이 들어가요" />
android:textSize="@dimen/size_15"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintEnd_toStartOf="@id/tv_last_comment_time"
app:layout_constraintStart_toEndOf="@+id/iv_profile"
app:layout_constraintTop_toTopOf="@+id/iv_profile"
tools:text="엄청나게 긴 제목이 들어가는 것을 표현하는 중 입니다" />

<TextView
android:id="@+id/tv_offering_description"
android:id="@+id/tv_last_comment_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:textColor="@color/gray_900"
app:formattedAmPmTime="@{commentRoom.latestCommentTime}"
app:layout_constraintBottom_toBottomOf="@+id/tv_offering_title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/tv_offering_title"
app:layout_constraintTop_toTopOf="@id/tv_offering_title"
tools:text="오전 10:33" />

<TextView
android:id="@+id/tv_offering_description"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="3.25dp"
android:layout_marginEnd="@dimen/margin_10"
android:ellipsize="end"
android:fontFamily="@font/suit_medium"
android:maxLines="1"
android:text="@{commentRoom.latestComment}"
android:textColor="@color/gray_500"
android:textSize="14dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@id/tv_offering_title"
app:layout_constraintTop_toBottomOf="@id/tv_offering_title"
tools:text="물품에 대해 설명 드릴게요." />

<TextView
android:id="@+id/tv_last_comment_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="18dp"
android:textColor="@color/gray_900"
app:formattedAmPmTime="@{commentRoom.latestCommentTime}"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/tv_offering_title"
tools:text="오전 10:33" />
tools:text="물품에 대해 설명 드릴게요. 물품에 대해 설명 드릴게요. 물품에 대해 설명 드릴게요. " />

<View
android:id="@+id/view_divide_line"
Expand All @@ -75,4 +87,4 @@
app:layout_constraintStart_toStartOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
</layout>

0 comments on commit 181ef1a

Please sign in to comment.