aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorDocile-Alligator <25734209+Docile-Alligator@users.noreply.github.com>2023-10-15 15:14:09 +0000
committerDocile-Alligator <25734209+Docile-Alligator@users.noreply.github.com>2023-10-15 15:14:09 +0000
commit23c353275c16ff1d92723343c6e0197f204c7349 (patch)
tree9efb7367d64d838e368eeb20ba301a85b6dd93a0 /app/src/main/java
parentdb4f416d4be8ba5769bef9e03cebdf2173ea2ef2 (diff)
downloadinfinity-for-reddit-23c353275c16ff1d92723343c6e0197f204c7349.tar
infinity-for-reddit-23c353275c16ff1d92723343c6e0197f204c7349.tar.gz
infinity-for-reddit-23c353275c16ff1d92723343c6e0197f204c7349.tar.bz2
infinity-for-reddit-23c353275c16ff1d92723343c6e0197f204c7349.tar.lz
infinity-for-reddit-23c353275c16ff1d92723343c6e0197f204c7349.tar.xz
infinity-for-reddit-23c353275c16ff1d92723343c6e0197f204c7349.tar.zst
infinity-for-reddit-23c353275c16ff1d92723343c6e0197f204c7349.zip
Continue implementing showing post filter usages in PostFilterPreferenceActivity.
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/adapters/navigationdrawer/PostFilterUsageEmbeddedRecyclerViewAdapter.java9
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/customviews/InterceptTouchEventLinearLayout.java31
2 files changed, 39 insertions, 1 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/navigationdrawer/PostFilterUsageEmbeddedRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/navigationdrawer/PostFilterUsageEmbeddedRecyclerViewAdapter.java
index 050afbd2..c13e548a 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/navigationdrawer/PostFilterUsageEmbeddedRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/navigationdrawer/PostFilterUsageEmbeddedRecyclerViewAdapter.java
@@ -85,7 +85,14 @@ public class PostFilterUsageEmbeddedRecyclerViewAdapter extends RecyclerView.Ada
public EntryViewHolder(@NonNull ItemPostFilterUsageEmbeddedBinding binding) {
super(binding.getRoot());
- this.textView = binding.getRoot();
+ textView = binding.getRoot();
+
+ textView.setTextColor(baseActivity.customThemeWrapper.getSecondaryTextColor());
+
+ if (baseActivity.typeface != null) {
+ textView.setTypeface(baseActivity.typeface);
+ }
+
textView.setOnClickListener(view -> {
Toast.makeText(baseActivity, textView.getText(), Toast.LENGTH_SHORT).show();
});
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/customviews/InterceptTouchEventLinearLayout.java b/app/src/main/java/ml/docilealligator/infinityforreddit/customviews/InterceptTouchEventLinearLayout.java
new file mode 100644
index 00000000..ebc7ce5b
--- /dev/null
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/customviews/InterceptTouchEventLinearLayout.java
@@ -0,0 +1,31 @@
+package ml.docilealligator.infinityforreddit.customviews;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.view.MotionEvent;
+import android.widget.LinearLayout;
+
+import androidx.annotation.Nullable;
+
+public class InterceptTouchEventLinearLayout extends LinearLayout {
+ public InterceptTouchEventLinearLayout(Context context) {
+ super(context);
+ }
+
+ public InterceptTouchEventLinearLayout(Context context, @Nullable AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ public InterceptTouchEventLinearLayout(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
+ super(context, attrs, defStyleAttr);
+ }
+
+ @Override
+ public boolean onInterceptTouchEvent(MotionEvent ev) {
+ return true;
+ }
+
+ public InterceptTouchEventLinearLayout(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
+ super(context, attrs, defStyleAttr, defStyleRes);
+ }
+}