aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDocile-Alligator <chineseperson5@gmail.com>2022-07-15 16:25:35 +0000
committerDocile-Alligator <chineseperson5@gmail.com>2022-07-15 16:25:35 +0000
commit12f404246bf95e69b7baab49f1798e725d07eead (patch)
tree8e6b3eb1a70aff5097a6c80ecc0ff22708be9020 /app
parent1cb79742c748f9c874b961a792119e6402375a06 (diff)
downloadinfinity-for-reddit-12f404246bf95e69b7baab49f1798e725d07eead.tar
infinity-for-reddit-12f404246bf95e69b7baab49f1798e725d07eead.tar.gz
infinity-for-reddit-12f404246bf95e69b7baab49f1798e725d07eead.tar.bz2
infinity-for-reddit-12f404246bf95e69b7baab49f1798e725d07eead.tar.lz
infinity-for-reddit-12f404246bf95e69b7baab49f1798e725d07eead.tar.xz
infinity-for-reddit-12f404246bf95e69b7baab49f1798e725d07eead.tar.zst
infinity-for-reddit-12f404246bf95e69b7baab49f1798e725d07eead.zip
Show the number of subscribers in SubredditAutocompleteRecyclerViewAdapter.
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/adapters/SubredditAutocompleteRecyclerViewAdapter.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/SubredditAutocompleteRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/SubredditAutocompleteRecyclerViewAdapter.java
index ac46be2b..ee1e1208 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/SubredditAutocompleteRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/SubredditAutocompleteRecyclerViewAdapter.java
@@ -53,6 +53,7 @@ public class SubredditAutocompleteRecyclerViewAdapter extends RecyclerView.Adapt
.apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(72, 0))))
.into(((SubredditViewHolder) holder).iconImageView);
((SubredditViewHolder) holder).subredditNameTextView.setText(subreddits.get(position).getName());
+ ((SubredditViewHolder) holder).subscriberCountTextView.setText(activity.getString(R.string.subscribers_number_detail, subreddits.get(position).getNSubscribers()));
}
}
@@ -78,6 +79,7 @@ public class SubredditAutocompleteRecyclerViewAdapter extends RecyclerView.Adapt
GifImageView iconImageView;
TextView subredditNameTextView;
+ TextView subscriberCountTextView;
ImageView subscribeImageView;
MaterialCheckBox checkBox;
@@ -85,6 +87,7 @@ public class SubredditAutocompleteRecyclerViewAdapter extends RecyclerView.Adapt
super(itemView);
iconImageView = itemView.findViewById(R.id.subreddit_icon_gif_image_view_item_subreddit_listing);
subredditNameTextView = itemView.findViewById(R.id.subreddit_name_text_view_item_subreddit_listing);
+ subscriberCountTextView = itemView.findViewById(R.id.subscriber_count_text_view_item_subreddit_listing);
subscribeImageView = itemView.findViewById(R.id.subscribe_image_view_item_subreddit_listing);
checkBox = itemView.findViewById(R.id.checkbox_item_subreddit_listing);
@@ -92,9 +95,11 @@ public class SubredditAutocompleteRecyclerViewAdapter extends RecyclerView.Adapt
checkBox.setVisibility(View.GONE);
subredditNameTextView.setTextColor(customThemeWrapper.getPrimaryTextColor());
+ subscriberCountTextView.setTextColor(customThemeWrapper.getSecondaryTextColor());
if (activity.typeface != null) {
subredditNameTextView.setTypeface(activity.typeface);
+ subscriberCountTextView.setTypeface(activity.typeface);
}
itemView.setOnClickListener(view -> {