aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/ml
diff options
context:
space:
mode:
authorDocile-Alligator <25734209+Docile-Alligator@users.noreply.github.com>2023-10-14 22:51:18 +0000
committerDocile-Alligator <25734209+Docile-Alligator@users.noreply.github.com>2023-10-14 22:51:18 +0000
commit444a9b887700483a2c7d54ccc648db697ec63257 (patch)
tree2569080e94ee892db01693e882e09f491a6c2a1a /app/src/main/java/ml
parentcbd1d97188ba71d47f213c404ae59f99f2ab0be0 (diff)
downloadinfinity-for-reddit-444a9b887700483a2c7d54ccc648db697ec63257.tar
infinity-for-reddit-444a9b887700483a2c7d54ccc648db697ec63257.tar.gz
infinity-for-reddit-444a9b887700483a2c7d54ccc648db697ec63257.tar.bz2
infinity-for-reddit-444a9b887700483a2c7d54ccc648db697ec63257.tar.lz
infinity-for-reddit-444a9b887700483a2c7d54ccc648db697ec63257.tar.xz
infinity-for-reddit-444a9b887700483a2c7d54ccc648db697ec63257.tar.zst
infinity-for-reddit-444a9b887700483a2c7d54ccc648db697ec63257.zip
Start tweaking PostFilterPreferenceActivity.
Diffstat (limited to 'app/src/main/java/ml')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostFilterRecyclerViewAdapter.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostFilterRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostFilterRecyclerViewAdapter.java
index d2c3eabf..56559ed1 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostFilterRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostFilterRecyclerViewAdapter.java
@@ -13,6 +13,7 @@ import java.util.List;
import ml.docilealligator.infinityforreddit.R;
import ml.docilealligator.infinityforreddit.activities.BaseActivity;
import ml.docilealligator.infinityforreddit.customtheme.CustomThemeWrapper;
+import ml.docilealligator.infinityforreddit.databinding.ItemPostFilterBinding;
import ml.docilealligator.infinityforreddit.postfilter.PostFilter;
import ml.docilealligator.infinityforreddit.utils.Utils;
@@ -51,14 +52,14 @@ public class PostFilterRecyclerViewAdapter extends RecyclerView.Adapter<Recycler
if (viewType == VIEW_TYPE_HEADER) {
return new HeaderViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.item_filter_fragment_header, parent, false));
} else {
- return new PostFilterViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.item_post_filter, parent, false));
+ return new PostFilterViewHolder(ItemPostFilterBinding.inflate(LayoutInflater.from(parent.getContext()), parent, false));
}
}
@Override
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
if (holder instanceof PostFilterViewHolder) {
- ((PostFilterViewHolder) holder).textView.setText(postFilterList.get(position - 1).name);
+ ((PostFilterViewHolder) holder).binding.postFilterNameTextViewItemPostFilter.setText(postFilterList.get(position - 1).name);
}
}
@@ -73,16 +74,15 @@ public class PostFilterRecyclerViewAdapter extends RecyclerView.Adapter<Recycler
}
private class PostFilterViewHolder extends RecyclerView.ViewHolder {
- TextView textView;
+ ItemPostFilterBinding binding;
- public PostFilterViewHolder(@NonNull View itemView) {
- super(itemView);
- textView = (TextView) itemView;
-
- textView.setTextColor(customThemeWrapper.getPrimaryTextColor());
+ public PostFilterViewHolder(@NonNull ItemPostFilterBinding binding) {
+ super(binding.getRoot());
+ this.binding = binding;
+ binding.postFilterNameTextViewItemPostFilter.setTextColor(customThemeWrapper.getPrimaryTextColor());
if (activity.typeface != null) {
- textView.setTypeface(activity.typeface);
+ binding.postFilterNameTextViewItemPostFilter.setTypeface(activity.typeface);
}
itemView.setOnClickListener(view -> {