diff options
author | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2024-08-20 18:51:07 +0000 |
---|---|---|
committer | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2024-08-20 18:51:07 +0000 |
commit | e4abfc6e38dc80b4376e86a28813d5c098ace5d6 (patch) | |
tree | 805415195c474e2547b1a5708531b3dd1d94730a | |
parent | da8785fdc8897133c22e7dfa90a0b5aff1bd7547 (diff) | |
download | infinity-for-reddit-e4abfc6e38dc80b4376e86a28813d5c098ace5d6.tar infinity-for-reddit-e4abfc6e38dc80b4376e86a28813d5c098ace5d6.tar.gz infinity-for-reddit-e4abfc6e38dc80b4376e86a28813d5c098ace5d6.tar.bz2 infinity-for-reddit-e4abfc6e38dc80b4376e86a28813d5c098ace5d6.tar.lz infinity-for-reddit-e4abfc6e38dc80b4376e86a28813d5c098ace5d6.tar.xz infinity-for-reddit-e4abfc6e38dc80b4376e86a28813d5c098ace5d6.tar.zst infinity-for-reddit-e4abfc6e38dc80b4376e86a28813d5c098ace5d6.zip |
Refine UI and add explanations for the name in CustomizeCommentFilterActivity.
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> |