From b29bbf4321205a665ed74ecf05b54205d34d0840 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Mon, 26 Aug 2019 17:06:50 +0800 Subject: Display an archived icon if the post is archived. Display a locked icon if the post is locked. --- .../CommentAndPostRecyclerViewAdapter.java | 16 ++++ .../infinityforreddit/PostRecyclerViewAdapter.java | 10 +++ .../main/res/drawable/ic_archive_outline_24dp.xml | 9 +++ app/src/main/res/layout/item_comment.xml | 4 +- app/src/main/res/layout/item_post.xml | 80 +++++++++++++------ app/src/main/res/layout/item_post_detail.xml | 93 +++++++++++++++++++++- app/src/main/res/values/colors.xml | 4 + 7 files changed, 187 insertions(+), 29 deletions(-) create mode 100644 app/src/main/res/drawable/ic_archive_outline_24dp.xml (limited to 'app/src') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/CommentAndPostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/CommentAndPostRecyclerViewAdapter.java index ec46235d..095abbaa 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/CommentAndPostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/CommentAndPostRecyclerViewAdapter.java @@ -331,6 +331,14 @@ class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter { if(mAccessToken == null) { Toast.makeText(mActivity, R.string.login_first, Toast.LENGTH_SHORT).show(); @@ -989,6 +1003,8 @@ class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter + + diff --git a/app/src/main/res/layout/item_comment.xml b/app/src/main/res/layout/item_comment.xml index a9489d0a..16c4dafa 100644 --- a/app/src/main/res/layout/item_comment.xml +++ b/app/src/main/res/layout/item_comment.xml @@ -92,8 +92,10 @@ android:src="@drawable/ic_arrow_downward_black_20dp" android:tint="@android:color/tab_indicator_text" app:layout_constraintStart_toEndOf="@+id/score_text_view_item_post_comment" + app:layout_constraintEnd_toStartOf="@id/more_button_item_post_comment" app:layout_constraintTop_toTopOf="parent" - app:layout_constraintBottom_toBottomOf="parent" /> + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintHorizontal_bias="0" /> - + android:padding="16dp"> + app:chipBackgroundColor="@color/backgroundColorPrimaryDark" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + android:layout_marginStart="16dp" + android:visibility="gone" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toEndOf="@+id/type_text_view_item_post" + app:layout_constraintTop_toTopOf="parent" /> + android:textSize="20sp" + android:visibility="gone" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toEndOf="@+id/gilded_image_view_item_post" + app:layout_constraintTop_toTopOf="parent" /> + + + + + android:visibility="gone" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toEndOf="@+id/gilded_number_text_view_item_post" + app:layout_constraintTop_toTopOf="parent" /> + app:chipBackgroundColor="@color/colorAccent" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toTopOf="parent" /> - + - + + + + + + + + + + + + + + + + + + #B3E5F9 #B3E5F9 + + #B4009F + + #EE7302 -- cgit v1.2.3