From 2b0b7d93a8c759ed9cff5bd13d414c4e645d0111 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Wed, 7 Apr 2021 23:51:26 +0800 Subject: UI changes in comments. --- .../activities/LoginActivity.java | 1 + .../CommentAndPostRecyclerViewAdapter.java | 18 +- app/src/main/res/layout/item_comment.xml | 223 ++++++++++++--------- 3 files changed, 137 insertions(+), 105 deletions(-) diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/LoginActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/LoginActivity.java index 21f49973..8bdc0528 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/LoginActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/LoginActivity.java @@ -231,6 +231,7 @@ public class LoginActivity extends BaseActivity { @Override public void onFailure(@NonNull Call call, @NonNull Throwable t) { Toast.makeText(LoginActivity.this, R.string.retrieve_token_error, Toast.LENGTH_SHORT).show(); + t.printStackTrace(); finish(); } }); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentAndPostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentAndPostRecyclerViewAdapter.java index 13f9d07f..63c7f230 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentAndPostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentAndPostRecyclerViewAdapter.java @@ -1104,7 +1104,7 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter 0) { switch (comment.getDepth() % 7) { case 0: @@ -1137,7 +1137,7 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter 0) { switch (comment.getDepth() % 7) { case 0: @@ -1239,7 +1239,7 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter 0) { switch (placeholder.getDepth() % 7) { case 0: @@ -1281,7 +1281,7 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter hideToolbar(); - linearLayout.setOnLongClickListener(hideToolbarOnLongClickListener); + itemView.setOnLongClickListener(hideToolbarOnLongClickListener); commentMarkdownView.setOnLongClickListener(hideToolbarOnLongClickListener); commentTimeTextView.setOnLongClickListener(hideToolbarOnLongClickListener); } @@ -3781,7 +3781,7 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter hideToolbar(); - linearLayout.setOnClickListener(hideToolbarOnClickListener); + itemView.setOnClickListener(hideToolbarOnClickListener); commentTimeTextView.setOnClickListener(hideToolbarOnClickListener); } commentMarkdownView.setOnLongClickListener(view -> { diff --git a/app/src/main/res/layout/item_comment.xml b/app/src/main/res/layout/item_comment.xml index afc779b6..9ba592ed 100644 --- a/app/src/main/res/layout/item_comment.xml +++ b/app/src/main/res/layout/item_comment.xml @@ -2,13 +2,13 @@ @@ -17,6 +17,36 @@ android:layout_width="0dp" android:layout_height="match_parent" /> + + + android:fontFamily="?attr/font_family" + tools:visibility="visible" /> - + - + - + - + - + - + - + - + - + - + - +