diff options
author | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2024-08-20 19:08:04 +0000 |
---|---|---|
committer | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2024-08-20 19:08:04 +0000 |
commit | 3f5d298ff5a65436b9922206ab067bd28c34bbe6 (patch) | |
tree | f8a48d29481686eaf5e801412767210ed838a658 /app/src/main/res | |
parent | e4abfc6e38dc80b4376e86a28813d5c098ace5d6 (diff) | |
download | infinity-for-reddit-3f5d298ff5a65436b9922206ab067bd28c34bbe6.tar infinity-for-reddit-3f5d298ff5a65436b9922206ab067bd28c34bbe6.tar.gz infinity-for-reddit-3f5d298ff5a65436b9922206ab067bd28c34bbe6.tar.bz2 infinity-for-reddit-3f5d298ff5a65436b9922206ab067bd28c34bbe6.tar.lz infinity-for-reddit-3f5d298ff5a65436b9922206ab067bd28c34bbe6.tar.xz infinity-for-reddit-3f5d298ff5a65436b9922206ab067bd28c34bbe6.tar.zst infinity-for-reddit-3f5d298ff5a65436b9922206ab067bd28c34bbe6.zip |
Refine UI in CustomizePostFilterActivity and CustomizeCommentFilterActivity.
Diffstat (limited to '')
5 files changed, 142 insertions, 46 deletions
diff --git a/app/src/main/res/layout-land/activity_customize_post_filter.xml b/app/src/main/res/layout-land/activity_customize_post_filter.xml index 61ce99cc..32197519 100644 --- a/app/src/main/res/layout-land/activity_customize_post_filter.xml +++ b/app/src/main/res/layout-land/activity_customize_post_filter.xml @@ -50,26 +50,57 @@ android:layout_height="wrap_content" android:orientation="vertical"> - <com.google.android.material.textfield.TextInputLayout - android:id="@+id/name_text_input_layout_customize_post_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_post_filter_activity" + android:layout_marginTop="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/post_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/post_filter_post_type_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_post_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_post_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/post_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/post_type_card_view_customize_post_filter_activity" diff --git a/app/src/main/res/layout-sw600dp/activity_customize_post_filter.xml b/app/src/main/res/layout-sw600dp/activity_customize_post_filter.xml index 61ce99cc..32197519 100644 --- a/app/src/main/res/layout-sw600dp/activity_customize_post_filter.xml +++ b/app/src/main/res/layout-sw600dp/activity_customize_post_filter.xml @@ -50,26 +50,57 @@ android:layout_height="wrap_content" android:orientation="vertical"> - <com.google.android.material.textfield.TextInputLayout - android:id="@+id/name_text_input_layout_customize_post_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_post_filter_activity" + android:layout_marginTop="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/post_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/post_filter_post_type_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_post_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_post_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/post_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/post_type_card_view_customize_post_filter_activity" 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 75ac2f88..1022e720 100644 --- a/app/src/main/res/layout/activity_customize_comment_filter.xml +++ b/app/src/main/res/layout/activity_customize_comment_filter.xml @@ -47,7 +47,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginStart="16dp" - android:layout_marginTop="8dp" + android:layout_marginTop="16dp" android:layout_marginEnd="16dp" android:layout_marginBottom="8dp" app:cardCornerRadius="12dp"> 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 89c59f4e..575bc9c0 100644 --- a/app/src/main/res/layout/activity_customize_post_filter.xml +++ b/app/src/main/res/layout/activity_customize_post_filter.xml @@ -43,26 +43,59 @@ android:layout_height="wrap_content" android:orientation="vertical"> - <com.google.android.material.textfield.TextInputLayout - android:id="@+id/name_text_input_layout_customize_post_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_post_filter_activity" + android:layout_marginStart="16dp" + android:layout_marginTop="16dp" + 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/post_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/post_filter_post_type_explanation" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_default" /> + + <com.google.android.material.textfield.TextInputLayout + android:id="@+id/name_text_input_layout_customize_post_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_post_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/post_filter_name_hint" + android:maxLines="10" /> - </com.google.android.material.textfield.TextInputLayout> + </com.google.android.material.textfield.TextInputLayout> + + </LinearLayout> + + </com.google.android.material.card.MaterialCardView> <com.google.android.material.card.MaterialCardView android:id="@+id/post_type_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 301d02f1..1b50d61e 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1153,6 +1153,7 @@ <string name="edit_post_filter_name_of_usage_info">Leave it blank to apply this post filter to all the subreddits / users / multireddits</string> <string name="click_to_apply_post_filter">Click here to apply it to some post feeds</string> <string name="post_filter_usage_embedded_more_count">and %1$d more</string> + <string name="post_filter_name_explanation">The post filter name should be unique.</string> <string name="post_filter_post_type_explanation">To see certain types of posts, please turn on the switch corresponding to the types.</string> <string name="post_filter_only_nsfw_spoiler_explanation">To only see NSFW or spoiler posts, please turn on the corresponding switch.</string> <string name="post_filter_title_excludes_strings_explanation">Posts will be filtered out if they contain the following keywords in their title.</string> |