From 1cb79742c748f9c874b961a792119e6402375a06 Mon Sep 17 00:00:00 2001 From: Docile-Alligator Date: Fri, 15 Jul 2022 18:02:11 +0800 Subject: Show the number of subscribers in SubredditListingRecyclerViewAdapter. --- .../SubredditListingRecyclerViewAdapter.java | 5 +++ .../fragments/SubredditListingFragment.java | 2 +- app/src/main/res/layout/item_subreddit_listing.xml | 50 +++++++++++++++------- 3 files changed, 40 insertions(+), 17 deletions(-) diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/SubredditListingRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/SubredditListingRecyclerViewAdapter.java index e3bbda50..e1cd8a1c 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/SubredditListingRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/SubredditListingRecyclerViewAdapter.java @@ -141,6 +141,7 @@ public class SubredditListingRecyclerViewAdapter extends PagedListAdapter= Build.VERSION_CODES.O && mSharedPreferences.getBoolean(SharedPreferencesUtils.IMMERSIVE_INTERFACE_KEY, true)) { diff --git a/app/src/main/res/layout/item_subreddit_listing.xml b/app/src/main/res/layout/item_subreddit_listing.xml index e756edf1..9b75025f 100644 --- a/app/src/main/res/layout/item_subreddit_listing.xml +++ b/app/src/main/res/layout/item_subreddit_listing.xml @@ -4,53 +4,71 @@ android:id="@+id/constraint_layout_item_subreddit_listing" android:layout_width="match_parent" android:layout_height="wrap_content" - android:padding="16dp" + android:background="?attr/selectableItemBackground" android:clickable="true" android:focusable="true" - android:background="?attr/selectableItemBackground"> + android:padding="16dp"> + app:layout_constraintTop_toTopOf="parent" /> + + + app:layout_constraintEnd_toStartOf="@id/barrier3" + app:layout_constraintTop_toBottomOf="@id/subreddit_name_text_view_item_subreddit_listing" /> + android:src="@drawable/ic_add_24dp" + android:visibility="gone" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + \ No newline at end of file -- cgit v1.2.3