From da8785fdc8897133c22e7dfa90a0b5aff1bd7547 Mon Sep 17 00:00:00 2001
From: Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com>
Date: Tue, 20 Aug 2024 14:34:36 -0400
Subject: Refine UI and add explanations in CustomizeCommentFilterActivity.
---
.../activities/CustomizeCommentFilterActivity.java | 14 +
.../layout/activity_customize_comment_filter.xml | 341 +++++++++++++++------
app/src/main/res/values/strings.xml | 5 +
3 files changed, 262 insertions(+), 98 deletions(-)
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CustomizeCommentFilterActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CustomizeCommentFilterActivity.java
index afa5cad6..b8e5d15e 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CustomizeCommentFilterActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CustomizeCommentFilterActivity.java
@@ -183,6 +183,10 @@ public class CustomizeCommentFilterActivity extends BaseActivity {
binding.nameTextInputLayoutCustomizeCommentFilterActivity.setBoxStrokeColor(primaryTextColor);
binding.nameTextInputLayoutCustomizeCommentFilterActivity.setDefaultHintTextColor(ColorStateList.valueOf(primaryTextColor));
binding.nameTextInputEditTextCustomizeCommentFilterActivity.setTextColor(primaryTextColor);
+
+ int filledCardViewBackgroundColor = mCustomThemeWrapper.getFilledCardViewBackgroundColor();
+ binding.displayModeCardViewCustomizePostFilterActivity.setCardBackgroundColor(filledCardViewBackgroundColor);
+ binding.displayModeExplanationTextViewCustomizePostFilterActivity.setTextColor(primaryTextColor);
binding.displayModeTitleTextViewCustomizeCommentFilterActivity.setTextColor(primaryTextColor);
binding.displayModeSpinnerCustomizeCommentFilterActivity.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
@@ -198,15 +202,25 @@ public class CustomizeCommentFilterActivity extends BaseActivity {
}
});
+
+ binding.excludeStringsCardViewCustomizePostFilterActivity.setCardBackgroundColor(filledCardViewBackgroundColor);
+ binding.excludeStringsExplanationTextViewCustomizePostFilterActivity.setTextColor(primaryTextColor);
binding.excludeStringsTextInputLayoutCustomizeCommentFilterActivity.setBoxStrokeColor(primaryTextColor);
binding.excludeStringsTextInputLayoutCustomizeCommentFilterActivity.setDefaultHintTextColor(ColorStateList.valueOf(primaryTextColor));
binding.excludeStringsTextInputEditTextCustomizeCommentFilterActivity.setTextColor(primaryTextColor);
+
+ binding.excludeUsersCardViewCustomizePostFilterActivity.setCardBackgroundColor(filledCardViewBackgroundColor);
+ binding.excludeUsersExplanationTextViewCustomizePostFilterActivity.setTextColor(primaryTextColor);
binding.excludeUsersTextInputLayoutCustomizeCommentFilterActivity.setDefaultHintTextColor(ColorStateList.valueOf(primaryTextColor));
binding.excludeUsersTextInputEditTextCustomizeCommentFilterActivity.setTextColor(primaryTextColor);
binding.addUsersImageViewCustomizeCommentFilterActivity.setImageDrawable(Utils.getTintedDrawable(this, R.drawable.ic_add_24dp, primaryIconColor));
+
+ binding.voteCardViewCustomizePostFilterActivity.setCardBackgroundColor(filledCardViewBackgroundColor);
+ binding.minVoteExplanationTextViewCustomizePostFilterActivity.setTextColor(primaryTextColor);
binding.minVoteTextInputLayoutCustomizeCommentFilterActivity.setBoxStrokeColor(primaryTextColor);
binding.minVoteTextInputLayoutCustomizeCommentFilterActivity.setDefaultHintTextColor(ColorStateList.valueOf(primaryTextColor));
binding.minVoteTextInputEditTextCustomizeCommentFilterActivity.setTextColor(primaryTextColor);
+ binding.maxVoteExplanationTextViewCustomizePostFilterActivity.setTextColor(primaryTextColor);
binding.maxVoteTextInputLayoutCustomizeCommentFilterActivity.setBoxStrokeColor(primaryTextColor);
binding.maxVoteTextInputLayoutCustomizeCommentFilterActivity.setDefaultHintTextColor(ColorStateList.valueOf(primaryTextColor));
binding.maxVoteTextInputEditTextCustomizeCommentFilterActivity.setTextColor(primaryTextColor);
diff --git a/app/src/main/res/layout/activity_customize_comment_filter.xml b/app/src/main/res/layout/activity_customize_comment_filter.xml
index 4e393ff4..7d8987ef 100644
--- a/app/src/main/res/layout/activity_customize_comment_filter.xml
+++ b/app/src/main/res/layout/activity_customize_comment_filter.xml
@@ -62,134 +62,279 @@
-
+ app:cardCornerRadius="12dp">
-
-
-
+ android:orientation="vertical">
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+ android:layout_marginStart="16dp"
+ android:layout_marginTop="8dp"
+ android:layout_marginEnd="16dp"
+ android:layout_marginBottom="8dp"
+ app:cardCornerRadius="12dp">
-
-
-
+ android:orientation="vertical">
-
-
-
-
-
+ android:textColor="?attr/primaryTextColor"
+ android:fontFamily="?attr/font_family" />
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ android:layout_marginStart="16dp"
+ android:layout_marginTop="8dp"
+ android:layout_marginEnd="16dp"
+ android:layout_marginBottom="8dp"
+ app:cardCornerRadius="12dp">
-
-
-
+ android:orientation="vertical">
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ android:layout_marginStart="16dp"
+ android:layout_marginTop="8dp"
+ android:layout_marginEnd="16dp"
+ android:layout_marginBottom="8dp"
+ app:cardCornerRadius="12dp">
-
+ android:orientation="vertical">
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 9792add7..eea33bad 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -1424,5 +1424,10 @@
Display mode
Remove comments
Fully collapse comments
+ Filtered out comments will be shown as the following selected option
+ Comments will be filtered out if they contain the following keywords.
+ Comments will be filtered out if they were submitted by the following users.
+ Comments that have a score lower than the following value will be filtered out (-1 means no restriction).
+ Comments that have a score higher than the following value will be filtered out (-1 means no restriction).
--
cgit v1.2.3