From 06a692130ca321796df0429b6eb54e72ed694424 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Mon, 3 Sep 2018 00:05:42 +0800 Subject: Replace the RecyclerView for comments to MultiLevelRecyclerView in order to display the comment trees easily. Click the expand more button to expand the comment tree. Click the expand less button to hide the comment tree. Rewrite some code. --- .../res/drawable/ic_arrow_downward_black_12dp.xml | 4 - .../res/drawable/ic_arrow_downward_black_20dp.xml | 4 + .../res/drawable/ic_arrow_upward_black_12dp.xml | 4 - .../res/drawable/ic_arrow_upward_black_20dp.xml | 4 + .../res/drawable/ic_expand_less_black_20dp.xml | 4 + .../res/drawable/ic_expand_more_black_20dp.xml | 4 + app/src/main/res/drawable/ic_reply_black_12dp.xml | 4 - app/src/main/res/drawable/ic_reply_black_20dp.xml | 4 + .../main/res/layout/activity_view_post_detail.xml | 7 +- app/src/main/res/layout/item_post_comment.xml | 198 ++++++++++++--------- 10 files changed, 137 insertions(+), 100 deletions(-) delete mode 100644 app/src/main/res/drawable/ic_arrow_downward_black_12dp.xml create mode 100644 app/src/main/res/drawable/ic_arrow_downward_black_20dp.xml delete mode 100644 app/src/main/res/drawable/ic_arrow_upward_black_12dp.xml create mode 100644 app/src/main/res/drawable/ic_arrow_upward_black_20dp.xml create mode 100644 app/src/main/res/drawable/ic_expand_less_black_20dp.xml create mode 100644 app/src/main/res/drawable/ic_expand_more_black_20dp.xml delete mode 100644 app/src/main/res/drawable/ic_reply_black_12dp.xml create mode 100644 app/src/main/res/drawable/ic_reply_black_20dp.xml (limited to 'app/src/main/res') diff --git a/app/src/main/res/drawable/ic_arrow_downward_black_12dp.xml b/app/src/main/res/drawable/ic_arrow_downward_black_12dp.xml deleted file mode 100644 index 91cbabce..00000000 --- a/app/src/main/res/drawable/ic_arrow_downward_black_12dp.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_arrow_downward_black_20dp.xml b/app/src/main/res/drawable/ic_arrow_downward_black_20dp.xml new file mode 100644 index 00000000..964c12ac --- /dev/null +++ b/app/src/main/res/drawable/ic_arrow_downward_black_20dp.xml @@ -0,0 +1,4 @@ + + + diff --git a/app/src/main/res/drawable/ic_arrow_upward_black_12dp.xml b/app/src/main/res/drawable/ic_arrow_upward_black_12dp.xml deleted file mode 100644 index 355c40f0..00000000 --- a/app/src/main/res/drawable/ic_arrow_upward_black_12dp.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_arrow_upward_black_20dp.xml b/app/src/main/res/drawable/ic_arrow_upward_black_20dp.xml new file mode 100644 index 00000000..320c0fc8 --- /dev/null +++ b/app/src/main/res/drawable/ic_arrow_upward_black_20dp.xml @@ -0,0 +1,4 @@ + + + diff --git a/app/src/main/res/drawable/ic_expand_less_black_20dp.xml b/app/src/main/res/drawable/ic_expand_less_black_20dp.xml new file mode 100644 index 00000000..54ce5912 --- /dev/null +++ b/app/src/main/res/drawable/ic_expand_less_black_20dp.xml @@ -0,0 +1,4 @@ + + + diff --git a/app/src/main/res/drawable/ic_expand_more_black_20dp.xml b/app/src/main/res/drawable/ic_expand_more_black_20dp.xml new file mode 100644 index 00000000..2e1e234a --- /dev/null +++ b/app/src/main/res/drawable/ic_expand_more_black_20dp.xml @@ -0,0 +1,4 @@ + + + diff --git a/app/src/main/res/drawable/ic_reply_black_12dp.xml b/app/src/main/res/drawable/ic_reply_black_12dp.xml deleted file mode 100644 index e35610aa..00000000 --- a/app/src/main/res/drawable/ic_reply_black_12dp.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_reply_black_20dp.xml b/app/src/main/res/drawable/ic_reply_black_20dp.xml new file mode 100644 index 00000000..9cb7e46c --- /dev/null +++ b/app/src/main/res/drawable/ic_reply_black_20dp.xml @@ -0,0 +1,4 @@ + + + diff --git a/app/src/main/res/layout/activity_view_post_detail.xml b/app/src/main/res/layout/activity_view_post_detail.xml index 4e9feffc..c3a1c688 100644 --- a/app/src/main/res/layout/activity_view_post_detail.xml +++ b/app/src/main/res/layout/activity_view_post_detail.xml @@ -258,7 +258,12 @@ android:textColor="#000000" android:textSize="18sp" /> - --> + + diff --git a/app/src/main/res/layout/item_post_comment.xml b/app/src/main/res/layout/item_post_comment.xml index c1421084..6981b955 100644 --- a/app/src/main/res/layout/item_post_comment.xml +++ b/app/src/main/res/layout/item_post_comment.xml @@ -2,104 +2,128 @@ + android:id="@+id/linear_layout_item_post_comment"> + + + android:layout_height="wrap_content" + android:layout_marginTop="12dp" + android:layout_marginBottom="12dp" + android:orientation="vertical"> - + android:layout_marginEnd="16dp"> - + - + - - - - - - - + - - - + + - - + android:layout_marginStart="16dp" + android:layout_marginEnd="16dp"> + + + + + + + + + + + + + + + + \ No newline at end of file -- cgit v1.2.3