diff options
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/layout/activity_customize_comment_filter.xml | 341 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 5 |
2 files changed, 248 insertions, 98 deletions
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 @@ </com.google.android.material.textfield.TextInputLayout> - <LinearLayout + <com.google.android.material.card.MaterialCardView + android:id="@+id/display_mode_card_view_customize_post_filter_activity" + style="?attr/materialCardViewFilledStyle" android:layout_width="match_parent" android:layout_height="wrap_content" + android:layout_marginStart="16dp" android:layout_marginTop="8dp" + android:layout_marginEnd="16dp" android:layout_marginBottom="8dp" - android:layout_marginStart="20dp"> + app:cardCornerRadius="12dp"> - <TextView - android:id="@+id/display_mode_title_text_view_customize_comment_filter_activity" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginEnd="16dp" - android:layout_gravity="center_vertical" - android:text="@string/comment_filter_display_mode" - android:textSize="?attr/font_default" - android:fontFamily="?attr/font_family" /> - - <androidx.appcompat.widget.AppCompatSpinner - android:id="@+id/display_mode_spinner_customize_comment_filter_activity" - android:layout_width="0dp" + <LinearLayout + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_weight="1" - android:layout_gravity="center_vertical" - android:entries="@array/comment_filter_display_mode" /> + android:orientation="vertical"> - </LinearLayout> + <TextView + android:id="@+id/display_mode_explanation_text_view_customize_post_filter_activity" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingTop="8dp" + android:paddingBottom="8dp" + android:paddingStart="16dp" + android:paddingEnd="16dp" + android:text="@string/comment_filter_display_mode_explanation" + android:textSize="?attr/font_default" + android:textColor="?attr/primaryTextColor" + android:fontFamily="?attr/font_family" /> - <com.google.android.material.textfield.TextInputLayout - android:id="@+id/exclude_strings_text_input_layout_customize_comment_filter_activity" + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="8dp" + android:layout_marginBottom="16dp" + android:layout_marginStart="20dp"> + + <TextView + android:id="@+id/display_mode_title_text_view_customize_comment_filter_activity" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginEnd="16dp" + android:layout_gravity="center_vertical" + android:text="@string/comment_filter_display_mode" + android:textSize="?attr/font_default" + android:fontFamily="?attr/font_family" /> + + <androidx.appcompat.widget.AppCompatSpinner + android:id="@+id/display_mode_spinner_customize_comment_filter_activity" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:layout_gravity="center_vertical" + android:entries="@array/comment_filter_display_mode" /> + + </LinearLayout> + + </LinearLayout> + + </com.google.android.material.card.MaterialCardView> + + <com.google.android.material.card.MaterialCardView + android:id="@+id/exclude_strings_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"> + android:layout_marginStart="16dp" + android:layout_marginTop="8dp" + android:layout_marginEnd="16dp" + android:layout_marginBottom="8dp" + app:cardCornerRadius="12dp"> - <com.google.android.material.textfield.TextInputEditText - android:id="@+id/exclude_strings_text_input_edit_text_customize_comment_filter_activity" + <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:fontFamily="?attr/font_family" - android:textSize="?attr/font_default" - android:hint="@string/excludes_strings_hint" - android:maxLines="10" /> - - </com.google.android.material.textfield.TextInputLayout> + android:orientation="vertical"> - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content"> - - <com.google.android.material.textfield.TextInputLayout - android:id="@+id/exclude_users_text_input_layout_customize_comment_filter_activity" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_weight="1" - android:paddingTop="8dp" - android:paddingBottom="8dp" - android:layout_marginStart="16dp" - style="@style/Widget.Material3.TextInputLayout.OutlinedBox"> - - <com.google.android.material.textfield.TextInputEditText - android:id="@+id/exclude_users_text_input_edit_text_customize_comment_filter_activity" + <TextView + android:id="@+id/exclude_strings_explanation_text_view_customize_post_filter_activity" android:layout_width="match_parent" android:layout_height="wrap_content" - android:fontFamily="?attr/font_family" + android:paddingTop="8dp" + android:paddingBottom="8dp" + android:paddingStart="16dp" + android:paddingEnd="16dp" + android:text="@string/comment_filter_exclude_strings_explanation" android:textSize="?attr/font_default" - android:hint="@string/exclude_users_hint" - android:maxLines="10" /> + android:textColor="?attr/primaryTextColor" + android:fontFamily="?attr/font_family" /> - </com.google.android.material.textfield.TextInputLayout> - - <ImageView - android:id="@+id/add_users_image_view_customize_comment_filter_activity" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center_vertical" - android:padding="16dp" - android:background="?actionBarItemBackground" - android:clickable="true" - android:focusable="true" /> - - </LinearLayout> - - <com.google.android.material.textfield.TextInputLayout - android:id="@+id/min_vote_text_input_layout_customize_comment_filter_activity" + <com.google.android.material.textfield.TextInputLayout + android:id="@+id/exclude_strings_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/exclude_strings_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/excludes_strings_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/exclude_users_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"> + android:layout_marginStart="16dp" + android:layout_marginTop="8dp" + android:layout_marginEnd="16dp" + android:layout_marginBottom="8dp" + app:cardCornerRadius="12dp"> - <com.google.android.material.textfield.TextInputEditText - android:id="@+id/min_vote_text_input_edit_text_customize_comment_filter_activity" + <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:inputType="numberSigned" - android:fontFamily="?attr/font_family" - android:textSize="?attr/font_default" - android:hint="@string/min_vote_hint" - android:maxLines="1" /> - - </com.google.android.material.textfield.TextInputLayout> + android:orientation="vertical"> - <com.google.android.material.textfield.TextInputLayout - android:id="@+id/max_vote_text_input_layout_customize_comment_filter_activity" + <TextView + android:id="@+id/exclude_users_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_exclude_users_explanation" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_default" /> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <com.google.android.material.textfield.TextInputLayout + android:id="@+id/exclude_users_text_input_layout_customize_comment_filter_activity" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:paddingTop="8dp" + android:paddingBottom="16dp" + android:layout_marginStart="16dp" + style="@style/Widget.Material3.TextInputLayout.OutlinedBox"> + + <com.google.android.material.textfield.TextInputEditText + android:id="@+id/exclude_users_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/exclude_users_hint" + android:maxLines="10" /> + + </com.google.android.material.textfield.TextInputLayout> + + <ImageView + android:id="@+id/add_users_image_view_customize_comment_filter_activity" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + android:padding="16dp" + android:background="?actionBarItemBackground" + android:clickable="true" + android:focusable="true" /> + + </LinearLayout> + + </LinearLayout> + + </com.google.android.material.card.MaterialCardView> + + <com.google.android.material.card.MaterialCardView + android:id="@+id/vote_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"> + android:layout_marginStart="16dp" + android:layout_marginTop="8dp" + android:layout_marginEnd="16dp" + android:layout_marginBottom="8dp" + app:cardCornerRadius="12dp"> - <com.google.android.material.textfield.TextInputEditText - android:id="@+id/max_vote_text_input_edit_text_customize_comment_filter_activity" + <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:inputType="numberSigned" - android:fontFamily="?attr/font_family" - android:textSize="?attr/font_default" - android:hint="@string/max_vote_hint" - android:maxLines="1" /> + android:orientation="vertical"> - </com.google.android.material.textfield.TextInputLayout> + <TextView + android:id="@+id/min_vote_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_min_vote_explanation" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_default" /> + + <com.google.android.material.textfield.TextInputLayout + android:id="@+id/min_vote_text_input_layout_customize_comment_filter_activity" + 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/min_vote_text_input_edit_text_customize_comment_filter_activity" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:inputType="numberSigned" + android:fontFamily="?attr/font_family" + android:textSize="?attr/font_default" + android:hint="@string/min_vote_hint" + android:maxLines="1" /> + + </com.google.android.material.textfield.TextInputLayout> + + <TextView + android:id="@+id/max_vote_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_max_vote_explanation" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_default" /> + + <com.google.android.material.textfield.TextInputLayout + android:id="@+id/max_vote_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/max_vote_text_input_edit_text_customize_comment_filter_activity" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:inputType="numberSigned" + android:fontFamily="?attr/font_family" + android:textSize="?attr/font_default" + android:hint="@string/max_vote_hint" + android:maxLines="1" /> + + </com.google.android.material.textfield.TextInputLayout> + + </LinearLayout> + + </com.google.android.material.card.MaterialCardView> </LinearLayout> 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 @@ <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_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> + <string name="comment_filter_max_vote_explanation">Comments that have a score higher than the following value will be filtered out (-1 means no restriction).</string> </resources> |