From 88691c109ab59dace0082e1e264f89055ce8c65e Mon Sep 17 00:00:00 2001
From: Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com>
Date: Mon, 19 Aug 2024 23:33:59 -0400
Subject: Explain every option in CustomizePostFilterActivity. Refine UI in
CustomizePostFilterActivity.
---
.../activities/CustomizePostFilterActivity.java | 42 +
.../res/layout/activity_customize_post_filter.xml | 1415 +++++++++++++-------
app/src/main/res/values/strings.xml | 15 +
3 files changed, 952 insertions(+), 520 deletions(-)
(limited to 'app/src/main')
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CustomizePostFilterActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CustomizePostFilterActivity.java
index 2432cc09..67d3301f 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CustomizePostFilterActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CustomizePostFilterActivity.java
@@ -266,6 +266,10 @@ public class CustomizePostFilterActivity extends BaseActivity {
binding.nameTextInputLayoutCustomizePostFilterActivity.setBoxStrokeColor(primaryTextColor);
binding.nameTextInputLayoutCustomizePostFilterActivity.setDefaultHintTextColor(ColorStateList.valueOf(primaryTextColor));
binding.nameTextInputEditTextCustomizePostFilterActivity.setTextColor(primaryTextColor);
+
+ int filledCardViewBackgroundColor = mCustomThemeWrapper.getFilledCardViewBackgroundColor();
+ binding.postTypeCardViewCustomizePostFilterActivity.setCardBackgroundColor(filledCardViewBackgroundColor);
+ binding.postTypeExplanationTextViewCustomizePostFilterActivity.setTextColor(primaryTextColor);
binding.postTypeTextTextViewCustomizePostFilterActivity.setCompoundDrawablesWithIntrinsicBounds(Utils.getTintedDrawable(this, R.drawable.ic_text_24dp, primaryIconColor), null, null, null);
binding.postTypeTextTextViewCustomizePostFilterActivity.setTextColor(primaryTextColor);
binding.postTypeLinkTextViewCustomizePostFilterActivity.setCompoundDrawablesWithIntrinsicBounds(Utils.getTintedDrawable(this, R.drawable.ic_link, primaryIconColor), null, null, null);
@@ -278,51 +282,89 @@ public class CustomizePostFilterActivity extends BaseActivity {
binding.postTypeVideoTextViewCustomizePostFilterActivity.setTextColor(primaryTextColor);
binding.postTypeGalleryTextViewCustomizePostFilterActivity.setCompoundDrawablesWithIntrinsicBounds(Utils.getTintedDrawable(this, R.drawable.ic_gallery_24dp, primaryIconColor), null, null, null);
binding.postTypeGalleryTextViewCustomizePostFilterActivity.setTextColor(primaryTextColor);
+
+ binding.onlyNsfwSpoilerCardViewCustomizePostFilterActivity.setCardBackgroundColor(filledCardViewBackgroundColor);
+ binding.onlyNsfwSpoilerExplanationTextViewCustomizePostFilterActivity.setTextColor(primaryTextColor);
binding.onlyNsfwTextViewCustomizePostFilterActivity.setCompoundDrawablesWithIntrinsicBounds(Utils.getTintedDrawable(this, R.drawable.ic_nsfw_on_24dp, primaryIconColor), null, null, null);
binding.onlyNsfwTextViewCustomizePostFilterActivity.setTextColor(primaryTextColor);
binding.onlySpoilerTextViewCustomizePostFilterActivity.setCompoundDrawablesWithIntrinsicBounds(Utils.getTintedDrawable(this, R.drawable.ic_spoiler_black_24dp, primaryIconColor), null, null, null);
binding.onlySpoilerTextViewCustomizePostFilterActivity.setTextColor(primaryTextColor);
+
+ binding.titleStringsCardViewCustomizePostFilterActivity.setCardBackgroundColor(filledCardViewBackgroundColor);
+ binding.titleExcludeStringsExplanationTextViewCustomizePostFilterActivity.setTextColor(primaryTextColor);
binding.titleExcludesStringsTextInputLayoutCustomizePostFilterActivity.setBoxStrokeColor(primaryTextColor);
binding.titleExcludesStringsTextInputLayoutCustomizePostFilterActivity.setDefaultHintTextColor(ColorStateList.valueOf(primaryTextColor));
binding.titleExcludesStringsTextInputEditTextCustomizePostFilterActivity.setTextColor(primaryTextColor);
+
+ binding.titleContainsStringsExplanationTextViewCustomizePostFilterActivity.setTextColor(primaryTextColor);
binding.titleContainsStringsTextInputLayoutCustomizePostFilterActivity.setBoxStrokeColor(primaryTextColor);
binding.titleContainsStringsTextInputLayoutCustomizePostFilterActivity.setDefaultHintTextColor(ColorStateList.valueOf(primaryTextColor));
binding.titleContainsStringsTextInputEditTextCustomizePostFilterActivity.setTextColor(primaryTextColor);
+
+ binding.titleRegexCardViewCustomizePostFilterActivity.setCardBackgroundColor(filledCardViewBackgroundColor);
+ binding.titleExcludesRegexExplanationTextViewCustomizePostFilterActivity.setTextColor(primaryTextColor);
binding.titleExcludesRegexTextInputLayoutCustomizePostFilterActivity.setBoxStrokeColor(primaryTextColor);
binding.titleExcludesRegexTextInputLayoutCustomizePostFilterActivity.setDefaultHintTextColor(ColorStateList.valueOf(primaryTextColor));
binding.titleExcludesRegexTextInputEditTextCustomizePostFilterActivity.setTextColor(primaryTextColor);
+
+ binding.titleContainsRegexExplanationTextViewCustomizePostFilterActivity.setTextColor(primaryTextColor);
binding.titleContainsRegexTextInputLayoutCustomizePostFilterActivity.setBoxStrokeColor(primaryTextColor);
binding.titleContainsRegexTextInputLayoutCustomizePostFilterActivity.setDefaultHintTextColor(ColorStateList.valueOf(primaryTextColor));
binding.titleContainsRegexTextInputEditTextCustomizePostFilterActivity.setTextColor(primaryTextColor);
+
+ binding.subredditsUsersCardViewCustomizePostFilterActivity.setCardBackgroundColor(filledCardViewBackgroundColor);
+ binding.excludeSubredditsExplanationTextViewCustomizePostFilterActivity.setTextColor(primaryTextColor);
binding.excludesSubredditsTextInputLayoutCustomizePostFilterActivity.setBoxStrokeColor(primaryTextColor);
binding.excludesSubredditsTextInputLayoutCustomizePostFilterActivity.setDefaultHintTextColor(ColorStateList.valueOf(primaryTextColor));
binding.excludesSubredditsTextInputEditTextCustomizePostFilterActivity.setTextColor(primaryTextColor);
binding.addSubredditsImageViewCustomizePostFilterActivity.setImageDrawable(Utils.getTintedDrawable(this, R.drawable.ic_add_24dp, primaryIconColor));
+
+ binding.excludeUsersExplanationTextViewCustomizePostFilterActivity.setTextColor(primaryTextColor);
binding.excludesUsersTextInputLayoutCustomizePostFilterActivity.setBoxStrokeColor(primaryTextColor);
binding.excludesUsersTextInputLayoutCustomizePostFilterActivity.setDefaultHintTextColor(ColorStateList.valueOf(primaryTextColor));
binding.excludesUsersTextInputEditTextCustomizePostFilterActivity.setTextColor(primaryTextColor);
binding.addUsersImageViewCustomizePostFilterActivity.setImageDrawable(Utils.getTintedDrawable(this, R.drawable.ic_add_24dp, primaryIconColor));
+
+ binding.flairsCardViewCustomizePostFilterActivity.setCardBackgroundColor(filledCardViewBackgroundColor);
+ binding.excludeFlairsExplanationTextViewCustomizePostFilterActivity.setTextColor(primaryTextColor);
binding.excludesFlairsTextInputLayoutCustomizePostFilterActivity.setBoxStrokeColor(primaryTextColor);
binding.excludesFlairsTextInputLayoutCustomizePostFilterActivity.setDefaultHintTextColor(ColorStateList.valueOf(primaryTextColor));
binding.excludesFlairsTextInputEditTextCustomizePostFilterActivity.setTextColor(primaryTextColor);
+
+ binding.containFlairsExplanationTextViewCustomizePostFilterActivity.setTextColor(primaryTextColor);
binding.containsFlairsTextInputLayoutCustomizePostFilterActivity.setBoxStrokeColor(primaryTextColor);
binding.containsFlairsTextInputLayoutCustomizePostFilterActivity.setDefaultHintTextColor(ColorStateList.valueOf(primaryTextColor));
binding.containsFlairsTextInputEditTextCustomizePostFilterActivity.setTextColor(primaryTextColor);
+
+ binding.domainsCardViewCustomizePostFilterActivity.setCardBackgroundColor(filledCardViewBackgroundColor);
+ binding.excludeDomainsExplanationTextViewCustomizePostFilterActivity.setTextColor(primaryTextColor);
binding.excludeDomainsTextInputLayoutCustomizePostFilterActivity.setBoxStrokeColor(primaryTextColor);
binding.excludeDomainsTextInputLayoutCustomizePostFilterActivity.setDefaultHintTextColor(ColorStateList.valueOf(primaryTextColor));
binding.excludeDomainsTextInputEditTextCustomizePostFilterActivity.setTextColor(primaryTextColor);
+
+ binding.containDomainsExplanationTextViewCustomizePostFilterActivity.setTextColor(primaryTextColor);
binding.containDomainsTextInputLayoutCustomizePostFilterActivity.setBoxStrokeColor(primaryTextColor);
binding.containDomainsTextInputLayoutCustomizePostFilterActivity.setDefaultHintTextColor(ColorStateList.valueOf(primaryTextColor));
binding.containDomainsTextInputEditTextCustomizePostFilterActivity.setTextColor(primaryTextColor);
+
+ binding.voteCardViewCustomizePostFilterActivity.setCardBackgroundColor(filledCardViewBackgroundColor);
+ binding.minVoteExplanationTextViewCustomizePostFilterActivity.setTextColor(primaryTextColor);
binding.minVoteTextInputLayoutCustomizePostFilterActivity.setBoxStrokeColor(primaryTextColor);
binding.minVoteTextInputLayoutCustomizePostFilterActivity.setDefaultHintTextColor(ColorStateList.valueOf(primaryTextColor));
binding.minVoteTextInputEditTextCustomizePostFilterActivity.setTextColor(primaryTextColor);
+
+ binding.maxVoteExplanationTextViewCustomizePostFilterActivity.setTextColor(primaryTextColor);
binding.maxVoteTextInputLayoutCustomizePostFilterActivity.setBoxStrokeColor(primaryTextColor);
binding.maxVoteTextInputLayoutCustomizePostFilterActivity.setDefaultHintTextColor(ColorStateList.valueOf(primaryTextColor));
binding.maxVoteTextInputEditTextCustomizePostFilterActivity.setTextColor(primaryTextColor);
+
+ binding.commentsCardViewCustomizePostFilterActivity.setCardBackgroundColor(filledCardViewBackgroundColor);
+ binding.minCommentsExplanationTextViewCustomizePostFilterActivity.setTextColor(primaryTextColor);
binding.minCommentsTextInputLayoutCustomizePostFilterActivity.setBoxStrokeColor(primaryTextColor);
binding.minCommentsTextInputLayoutCustomizePostFilterActivity.setDefaultHintTextColor(ColorStateList.valueOf(primaryTextColor));
binding.minCommentsTextInputEditTextCustomizePostFilterActivity.setTextColor(primaryTextColor);
+
+ binding.maxCommentsExplanationTextViewCustomizePostFilterActivity.setTextColor(primaryTextColor);
binding.maxCommentsTextInputLayoutCustomizePostFilterActivity.setBoxStrokeColor(primaryTextColor);
binding.maxCommentsTextInputLayoutCustomizePostFilterActivity.setDefaultHintTextColor(ColorStateList.valueOf(primaryTextColor));
binding.maxCommentsTextInputEditTextCustomizePostFilterActivity.setTextColor(primaryTextColor);
diff --git a/app/src/main/res/layout/activity_customize_post_filter.xml b/app/src/main/res/layout/activity_customize_post_filter.xml
index e41d0643..89c59f4e 100644
--- a/app/src/main/res/layout/activity_customize_post_filter.xml
+++ b/app/src/main/res/layout/activity_customize_post_filter.xml
@@ -64,597 +64,972 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ android:orientation="vertical">
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+ android:orientation="vertical">
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ android:layout_marginTop="8dp"
+ android:layout_marginBottom="8dp"
+ android:layout_marginStart="16dp"
+ android:layout_marginEnd="16dp"
+ app:cardCornerRadius="12dp">
-
+ android:orientation="vertical">
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ android:layout_marginTop="8dp"
+ android:layout_marginBottom="8dp"
+ android:layout_marginStart="16dp"
+ android:layout_marginEnd="16dp"
+ app:cardCornerRadius="12dp">
-
-
-
-
-
-
-
+ android:orientation="vertical">
-
-
-
-
-
-
-
-
-
-
-
+ android:textColor="?attr/primaryTextColor"
+ android:fontFamily="?attr/font_family" />
-
+
+
+
+
+
+
-
-
-
-
+ android:textColor="?attr/primaryTextColor"
+ android:fontFamily="?attr/font_family" />
-
-
-
+
+
+
+
+
+
+
+
+
+
+ android:layout_marginTop="8dp"
+ android:layout_marginBottom="8dp"
+ android:layout_marginStart="16dp"
+ android:layout_marginEnd="16dp"
+ app:cardCornerRadius="12dp">
-
+ android:orientation="vertical">
-
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ android:layout_marginTop="8dp"
+ android:layout_marginBottom="8dp"
+ android:layout_marginStart="16dp"
+ android:layout_marginEnd="16dp"
+ app:cardCornerRadius="12dp">
-
+ android:orientation="vertical">
-
-
-
-
-
+
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+ android:layout_marginTop="8dp"
+ android:layout_marginBottom="8dp"
+ android:layout_marginStart="16dp"
+ android:layout_marginEnd="16dp"
+ app:cardCornerRadius="12dp">
-
+ android:orientation="vertical">
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ android:layout_marginTop="8dp"
+ android:layout_marginBottom="8dp"
+ android:layout_marginStart="16dp"
+ android:layout_marginEnd="16dp"
+ app:cardCornerRadius="12dp">
-
+ android:orientation="vertical">
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ android:layout_marginTop="8dp"
+ android:layout_marginBottom="8dp"
+ android:layout_marginStart="16dp"
+ android:layout_marginEnd="16dp"
+ 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 444c95b9..9792add7 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -1154,6 +1154,21 @@
Click here to apply it to some post feeds
and %1$d more
To see certain types of posts, please turn on the switch corresponding to the types.
+ To only see NSFW or spoiler posts, please turn on the corresponding switch.
+ Posts will be filtered out if they contain the following keywords in their title.
+ Posts will be filtered out if they do not contain the following keywords in their title.
+ Posts will be filtered out if their title matches the following regular expression.
+ Posts will be filtered out if their title does not match the following regular expression.
+ Posts from the following subreddits will be filtered out.
+ Posts submitted by the following users will be filtered out.
+ Posts that have the following flairs will be filtered out.
+ Posts that do not have the following flairs will be filtered out.
+ Link posts that have the following urls will be filtered out.
+ Link posts that do not have the following urls will be filtered out.
+ Posts that have a score lower than the following value will be filtered out (-1 means no restriction).
+ Posts that have a score higher than the following value will be filtered out (-1 means no restriction).
+ Posts will be filtered out if the number of their comments is less than the following value. (-1 means no restriction).
+ Posts will be filtered out if the number of their comments is larger than the following value. (-1 means no restriction).
Exclude keywords (key1,key2)
Comment Filter Name
--
cgit v1.2.3