From 1fe50d2ccaae4e5846baeb559c1af5b4e89302e2 Mon Sep 17 00:00:00 2001 From: aayush262 Date: Sat, 17 Feb 2024 12:29:39 +0530 Subject: [PATCH] feat: reply in comments(WIP) --- .../media/comments/CommentsActivity.kt | 2 +- app/src/main/res/layout/activity_comments.xml | 119 ++++--- app/src/main/res/layout/item_comments.xml | 318 ++++++++++-------- 3 files changed, 251 insertions(+), 188 deletions(-) diff --git a/app/src/main/java/ani/dantotsu/media/comments/CommentsActivity.kt b/app/src/main/java/ani/dantotsu/media/comments/CommentsActivity.kt index 26d469c9..2b8c2476 100644 --- a/app/src/main/java/ani/dantotsu/media/comments/CommentsActivity.kt +++ b/app/src/main/java/ani/dantotsu/media/comments/CommentsActivity.kt @@ -73,7 +73,7 @@ class CommentsActivity : AppCompatActivity() { markwonEditor ) ) - + binding.commentReplyToContainer.visibility = View.GONE //TODO: implement reply var editing = false var editingCommentId = -1 fun editCallback(comment: CommentItem) { diff --git a/app/src/main/res/layout/activity_comments.xml b/app/src/main/res/layout/activity_comments.xml index 1f299f4d..b02eee5f 100644 --- a/app/src/main/res/layout/activity_comments.xml +++ b/app/src/main/res/layout/activity_comments.xml @@ -64,55 +64,98 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:visibility="gone" + tools:visibility="visible" tools:listitem="@layout/item_comments" /> - - + + - + - + + + + + + + + + diff --git a/app/src/main/res/layout/item_comments.xml b/app/src/main/res/layout/item_comments.xml index 68bb8e1b..e257e86d 100644 --- a/app/src/main/res/layout/item_comments.xml +++ b/app/src/main/res/layout/item_comments.xml @@ -7,188 +7,208 @@ android:layout_height="wrap_content" android:layout_marginStart="6dp" android:layout_marginEnd="6dp" - android:layout_marginBottom="12dp" - android:orientation="horizontal" + android:orientation="vertical" android:padding="6dp" - android:paddingStart="12dp" - android:paddingEnd="12dp"> - - + android:paddingStart="8dp" + android:paddingEnd="8dp"> + android:orientation="horizontal"> + + + android:layout_gravity="center_vertical" + android:layout_weight="1" + android:layout_marginStart="8dp" + android:orientation="vertical"> - + + + + + + + + + + + + + + android:maxLines="3" + android:ellipsize="end" + android:text="@string/slogan" + android:textSize="12sp" /> - + android:orientation="horizontal"> + + - - - + + + - - + android:layout_gravity="center_vertical" + android:orientation="vertical"> + - - - - - - + - - - - - + android:orientation="horizontal"> + + + + + \ No newline at end of file