aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/activities/CustomizeCommentFilterActivity.java5
-rw-r--r--app/src/main/res/layout/activity_customize_comment_filter.xml63
-rw-r--r--app/src/main/res/values/strings.xml3
3 files changed, 54 insertions, 17 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 b8e5d15e..ac08670a 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CustomizeCommentFilterActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CustomizeCommentFilterActivity.java
@@ -180,11 +180,14 @@ public class CustomizeCommentFilterActivity extends BaseActivity {
applyAppBarLayoutAndCollapsingToolbarLayoutAndToolbarTheme(binding.appbarLayoutCustomizeCommentFilterActivity, binding.collapsingToolbarLayoutCustomizeCommentFilterActivity, binding.toolbarCustomizeCommentFilterActivity);
int primaryTextColor = mCustomThemeWrapper.getPrimaryTextColor();
int primaryIconColor = mCustomThemeWrapper.getPrimaryIconColor();
+ int filledCardViewBackgroundColor = mCustomThemeWrapper.getFilledCardViewBackgroundColor();
+
+ binding.nameCardViewCustomizePostFilterActivity.setCardBackgroundColor(filledCardViewBackgroundColor);
+ binding.nameExplanationTextViewCustomizePostFilterActivity.setTextColor(primaryTextColor);
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);
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 7d8987ef..75ac2f88 100644
--- a/app/src/main/res/layout/activity_customize_comment_filter.xml
+++ b/app/src/main/res/layout/activity_customize_comment_filter.xml
@@ -41,26 +41,59 @@
android:layout_height="wrap_content"
android:orientation="vertical">
- <com.google.android.material.textfield.TextInputLayout
- android:id="@+id/name_text_input_layout_customize_comment_filter_activity"
+ <com.google.android.material.card.MaterialCardView
+ android:id="@+id/name_card_view_customize_post_filter_activity"
+ style="?attr/materialCardViewFilledStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:paddingTop="8dp"
- android:paddingBottom="8dp"
- android:paddingStart="16dp"
- android:paddingEnd="16dp"
- style="@style/Widget.Material3.TextInputLayout.OutlinedBox">
-
- <com.google.android.material.textfield.TextInputEditText
- android:id="@+id/name_text_input_edit_text_customize_comment_filter_activity"
+ android:layout_marginStart="16dp"
+ android:layout_marginTop="8dp"
+ android:layout_marginEnd="16dp"
+ android:layout_marginBottom="8dp"
+ app:cardCornerRadius="12dp">
+
+ <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:fontFamily="?attr/font_family"
- android:textSize="?attr/font_default"
- android:hint="@string/comment_filter_name_hint"
- android:maxLines="10" />
+ android:orientation="vertical">
+
+ <TextView
+ android:id="@+id/name_explanation_text_view_customize_post_filter_activity"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:fontFamily="?attr/font_family"
+ android:paddingStart="16dp"
+ android:paddingTop="8dp"
+ android:paddingEnd="16dp"
+ android:paddingBottom="8dp"
+ android:text="@string/comment_filter_name_explanation"
+ android:textColor="?attr/primaryTextColor"
+ android:textSize="?attr/font_default" />
- </com.google.android.material.textfield.TextInputLayout>
+ <com.google.android.material.textfield.TextInputLayout
+ android:id="@+id/name_text_input_layout_customize_comment_filter_activity"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingTop="8dp"
+ android:paddingBottom="16dp"
+ android:paddingStart="16dp"
+ android:paddingEnd="16dp"
+ style="@style/Widget.Material3.TextInputLayout.OutlinedBox">
+
+ <com.google.android.material.textfield.TextInputEditText
+ android:id="@+id/name_text_input_edit_text_customize_comment_filter_activity"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:fontFamily="?attr/font_family"
+ android:textSize="?attr/font_default"
+ android:hint="@string/comment_filter_name_hint"
+ android:maxLines="10" />
+
+ </com.google.android.material.textfield.TextInputLayout>
+
+ </LinearLayout>
+
+ </com.google.android.material.card.MaterialCardView>
<com.google.android.material.card.MaterialCardView
android:id="@+id/display_mode_card_view_customize_post_filter_activity"
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index eea33bad..301d02f1 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -1424,7 +1424,8 @@
<string name="comment_filter_display_mode">Display mode</string>
<string name="comment_filter_display_mode_remove_comments">Remove comments</string>
<string name="comment_filter_display_mode_fully_collapse_comments">Fully collapse comments</string>
- <string name="comment_filter_display_mode_explanation">Filtered out comments will be shown as the following selected option</string>
+ <string name="comment_filter_name_explanation">The comment filter name should be unique.</string>
+ <string name="comment_filter_display_mode_explanation">Filtered out comments will be shown as the following selected option.</string>
<string name="comment_filter_exclude_strings_explanation">Comments will be filtered out if they contain the following keywords.</string>
<string name="comment_filter_exclude_users_explanation">Comments will be filtered out if they were submitted by the following users.</string>
<string name="comment_filter_min_vote_explanation">Comments that have a score lower than the following value will be filtered out (-1 means no restriction).</string>