diff options
author | Alex Ning <chineseperson5@gmail.com> | 2020-12-26 07:25:40 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2020-12-26 07:25:40 +0000 |
commit | 97b5c5d5c6e4f0327aaa0e864ae1ce36b6e26a15 (patch) | |
tree | e8976d97e03ae64479554906d2be6beea7944f0a /app/src/main/res | |
parent | fa55fb369dd4c893f300e75bfadb705a9e82233f (diff) | |
download | infinity-for-reddit-97b5c5d5c6e4f0327aaa0e864ae1ce36b6e26a15.tar infinity-for-reddit-97b5c5d5c6e4f0327aaa0e864ae1ce36b6e26a15.tar.gz infinity-for-reddit-97b5c5d5c6e4f0327aaa0e864ae1ce36b6e26a15.tar.bz2 infinity-for-reddit-97b5c5d5c6e4f0327aaa0e864ae1ce36b6e26a15.tar.lz infinity-for-reddit-97b5c5d5c6e4f0327aaa0e864ae1ce36b6e26a15.tar.xz infinity-for-reddit-97b5c5d5c6e4f0327aaa0e864ae1ce36b6e26a15.tar.zst infinity-for-reddit-97b5c5d5c6e4f0327aaa0e864ae1ce36b6e26a15.zip |
Continue adding post filter.
Diffstat (limited to '')
7 files changed, 275 insertions, 1 deletions
diff --git a/app/src/main/res/layout/activity_post_filter_application.xml b/app/src/main/res/layout/activity_post_filter_application.xml new file mode 100644 index 00000000..6708bb4e --- /dev/null +++ b/app/src/main/res/layout/activity_post_filter_application.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:id="@+id/coordinator_layout_post_filter_application_activity" + tools:context=".activities.PostFilterUsageListingActivity"> + + <com.google.android.material.appbar.AppBarLayout + android:id="@+id/appbar_layout_post_filter_application_activity" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:theme="@style/AppTheme.AppBarOverlay"> + + <com.google.android.material.appbar.CollapsingToolbarLayout + android:id="@+id/collapsing_toolbar_layout_post_filter_application_activity" + android:layout_width="match_parent" + android:layout_height="match_parent" + app:layout_scrollFlags="scroll|enterAlways" + app:titleEnabled="false" + app:toolbarId="@+id/toolbar_post_filter_application_activity"> + + <androidx.appcompat.widget.Toolbar + android:id="@+id/toolbar_post_filter_application_activity" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:minHeight="?attr/actionBarSize" + app:popupTheme="@style/AppTheme.PopupOverlay" + app:navigationIcon="?attr/homeAsUpIndicator" /> + + </com.google.android.material.appbar.CollapsingToolbarLayout> + + </com.google.android.material.appbar.AppBarLayout> + + <androidx.recyclerview.widget.RecyclerView + android:id="@+id/recycler_view_post_filter_application_activity" + android:layout_width="match_parent" + android:layout_height="match_parent" + app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" + app:layout_behavior="@string/appbar_scrolling_view_behavior" /> + + <com.google.android.material.floatingactionbutton.FloatingActionButton + android:id="@+id/fab_post_filter_application_activity" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_margin="@dimen/fab_margin" + android:layout_gravity="bottom|end" + app:backgroundTint="?attr/colorPrimaryLightTheme" + app:srcCompat="@drawable/ic_add_day_night_24dp" + app:tint="@android:color/white" /> + +</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/dialog_edit_name.xml b/app/src/main/res/layout/dialog_edit_name.xml index bfd0cc8c..747d2d32 100644 --- a/app/src/main/res/layout/dialog_edit_name.xml +++ b/app/src/main/res/layout/dialog_edit_name.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <EditText xmlns:android="http://schemas.android.com/apk/res/android" - android:id="@+id/theme_name_edit_text_edit_name_dialog" + android:id="@+id/name_edit_text_edit_name_dialog" android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="24dp" diff --git a/app/src/main/res/layout/dialog_edit_post_filter_name_of_usage.xml b/app/src/main/res/layout/dialog_edit_post_filter_name_of_usage.xml new file mode 100644 index 00000000..0b6ffc3f --- /dev/null +++ b/app/src/main/res/layout/dialog_edit_post_filter_name_of_usage.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical"> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingTop="16dp" + android:paddingBottom="16dp" + android:paddingStart="24dp" + android:paddingEnd="24dp" + android:text="@string/edit_post_filter_name_of_usage_info" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_default" + android:fontFamily="?attr/font_family" /> + + <com.google.android.material.textfield.TextInputLayout + android:id="@+id/text_input_layout_edit_post_filter_name_of_usage_dialog" + 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.MaterialComponents.TextInputLayout.OutlinedBox"> + + <com.google.android.material.textfield.TextInputEditText + android:id="@+id/text_input_edit_text_edit_post_filter_name_of_usage_dialog" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:fontFamily="?attr/font_family" + android:textSize="?attr/font_default" /> + + </com.google.android.material.textfield.TextInputLayout> + +</LinearLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/fragment_new_post_filter_usage_bottom_sheet.xml b/app/src/main/res/layout/fragment_new_post_filter_usage_bottom_sheet.xml new file mode 100644 index 00000000..11515ec4 --- /dev/null +++ b/app/src/main/res/layout/fragment_new_post_filter_usage_bottom_sheet.xml @@ -0,0 +1,106 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="wrap_content" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:paddingBottom="8dp" + android:overScrollMode="never"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical"> + + <TextView + android:id="@+id/home_text_view_new_post_filter_usage_bottom_sheet_fragment" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/home" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_default" + android:fontFamily="?attr/font_family" + android:paddingTop="16dp" + android:paddingBottom="16dp" + android:paddingStart="32dp" + android:paddingEnd="32dp" + app:drawableStartCompat="@drawable/ic_home_black_24dp" + android:drawablePadding="48dp" + android:clickable="true" + android:focusable="true" + android:background="?attr/selectableItemBackground" /> + + <TextView + android:id="@+id/subreddit_text_view_new_post_filter_usage_bottom_sheet_fragment" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/subreddit" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_default" + android:fontFamily="?attr/font_family" + android:paddingTop="16dp" + android:paddingBottom="16dp" + android:paddingStart="32dp" + android:paddingEnd="32dp" + app:drawableStartCompat="@drawable/ic_subreddit_24dp" + android:drawablePadding="48dp" + android:clickable="true" + android:focusable="true" + android:background="?attr/selectableItemBackground" /> + + <TextView + android:id="@+id/user_text_view_new_post_filter_usage_bottom_sheet_fragment" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/user" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_default" + android:fontFamily="?attr/font_family" + android:paddingTop="16dp" + android:paddingBottom="16dp" + android:paddingStart="32dp" + android:paddingEnd="32dp" + app:drawableStartCompat="@drawable/ic_user_24dp" + android:drawablePadding="48dp" + android:clickable="true" + android:focusable="true" + android:background="?attr/selectableItemBackground" /> + + <TextView + android:id="@+id/multireddit_text_view_new_post_filter_usage_bottom_sheet_fragment" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/multi_reddit" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_default" + android:fontFamily="?attr/font_family" + android:paddingTop="16dp" + android:paddingBottom="16dp" + android:paddingStart="32dp" + android:paddingEnd="32dp" + app:drawableStartCompat="@drawable/ic_multi_reddit_24dp" + android:drawablePadding="48dp" + android:clickable="true" + android:focusable="true" + android:background="?attr/selectableItemBackground" /> + + <TextView + android:id="@+id/search_text_view_new_post_filter_usage_bottom_sheet_fragment" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/search" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_default" + android:fontFamily="?attr/font_family" + android:paddingTop="16dp" + android:paddingBottom="16dp" + android:paddingStart="32dp" + android:paddingEnd="32dp" + app:drawableStartCompat="@drawable/ic_search_24dp" + android:drawablePadding="48dp" + android:clickable="true" + android:focusable="true" + android:background="?attr/selectableItemBackground" /> + + </LinearLayout> + +</androidx.core.widget.NestedScrollView>
\ No newline at end of file diff --git a/app/src/main/res/layout/fragment_post_filter_usage_options_bottom_sheet.xml b/app/src/main/res/layout/fragment_post_filter_usage_options_bottom_sheet.xml new file mode 100644 index 00000000..e4a68585 --- /dev/null +++ b/app/src/main/res/layout/fragment_post_filter_usage_options_bottom_sheet.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="wrap_content" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:paddingBottom="8dp" + android:overScrollMode="never"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical"> + + <TextView + android:id="@+id/edit_text_view_post_filter_usage_options_bottom_sheet_fragment" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/edit" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_default" + android:fontFamily="?attr/font_family" + android:paddingTop="16dp" + android:paddingBottom="16dp" + android:paddingStart="32dp" + android:paddingEnd="32dp" + app:drawableStartCompat="@drawable/ic_edit_24dp" + android:drawablePadding="48dp" + android:clickable="true" + android:focusable="true" + android:background="?attr/selectableItemBackground" /> + + <TextView + android:id="@+id/delete_text_view_post_filter_usage_options_bottom_sheet_fragment" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/delete" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_default" + android:fontFamily="?attr/font_family" + android:paddingTop="16dp" + android:paddingBottom="16dp" + android:paddingStart="32dp" + android:paddingEnd="32dp" + app:drawableStartCompat="@drawable/ic_delete_24dp" + android:drawablePadding="48dp" + android:clickable="true" + android:focusable="true" + android:background="?attr/selectableItemBackground" /> + + </LinearLayout> + +</androidx.core.widget.NestedScrollView>
\ No newline at end of file diff --git a/app/src/main/res/layout/item_post_filter_usage.xml b/app/src/main/res/layout/item_post_filter_usage.xml new file mode 100644 index 00000000..62a5e886 --- /dev/null +++ b/app/src/main/res/layout/item_post_filter_usage.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<TextView + xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingTop="16dp" + android:paddingBottom="16dp" + android:paddingStart="72dp" + android:paddingEnd="16dp" + android:textColor="?attr/primaryTextColor" + android:textSize="?attr/font_16" + android:fontFamily="?attr/font_family" + android:clickable="true" + android:focusable="true" + android:background="?attr/selectableItemBackground" />
\ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 4d50431b..008e99e3 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -979,5 +979,16 @@ <string name="post_filter_name_hint">Post Filter Name</string> <string name="post_filter_requires_a_name">What is the name of this post filter?</string> <string name="apply_post_filter_to">Apply to</string> + <string name="post_filter_usage_home">Home</string> + <string name="post_filter_usage_subreddit">Subreddit: %1$s</string> + <string name="post_filter_usage_subreddit_all">Subreddit</string> + <string name="post_filter_usage_user">User: %1$s</string> + <string name="post_filter_usage_user_all">User</string> + <string name="post_filter_usage_multireddit">MultiReddit: %1$s</string> + <string name="post_filter_usage_multireddit_all">MultiReddit</string> + <string name="post_filter_usage_search">Search</string> + <string name="subreddit">Subreddit</string> + <string name="user">User</string> + <string name="edit_post_filter_name_of_usage_info">Leave it blank to apply this post filter to all the subreddits / users / multireddits</string> </resources> |