diff options
author | Alex Ning <chineseperson5@gmail.com> | 2020-12-25 16:26:30 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2020-12-25 16:26:30 +0000 |
commit | fa55fb369dd4c893f300e75bfadb705a9e82233f (patch) | |
tree | bba546bc28100d4ddf5c95a654819c606730d092 /app/src/main/res/layout | |
parent | 265805038df07da33808f1d539ab8f02d4a84f6a (diff) | |
download | infinity-for-reddit-fa55fb369dd4c893f300e75bfadb705a9e82233f.tar infinity-for-reddit-fa55fb369dd4c893f300e75bfadb705a9e82233f.tar.gz infinity-for-reddit-fa55fb369dd4c893f300e75bfadb705a9e82233f.tar.bz2 infinity-for-reddit-fa55fb369dd4c893f300e75bfadb705a9e82233f.tar.lz infinity-for-reddit-fa55fb369dd4c893f300e75bfadb705a9e82233f.tar.xz infinity-for-reddit-fa55fb369dd4c893f300e75bfadb705a9e82233f.tar.zst infinity-for-reddit-fa55fb369dd4c893f300e75bfadb705a9e82233f.zip |
Replace Filter settings with Post Filter.
Diffstat (limited to '')
6 files changed, 187 insertions, 6 deletions
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 72aeb6bc..b7940c7a 100644 --- a/app/src/main/res/layout/activity_customize_post_filter.xml +++ b/app/src/main/res/layout/activity_customize_post_filter.xml @@ -43,6 +43,26 @@ 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" + 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/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" /> + + </com.google.android.material.textfield.TextInputLayout> + <LinearLayout android:id="@+id/post_type_text_linear_layout_customize_post_filter_activity" android:layout_width="match_parent" @@ -339,7 +359,7 @@ android:layout_height="wrap_content" android:fontFamily="?attr/font_family" android:textSize="?attr/font_default" - android:hint="@string/excludes_subreddits_hint" /> + android:hint="@string/exclude_subreddits_hint" /> </com.google.android.material.textfield.TextInputLayout> @@ -359,7 +379,7 @@ android:layout_height="wrap_content" android:fontFamily="?attr/font_family" android:textSize="?attr/font_default" - android:hint="@string/excludes_users_hint" /> + android:hint="@string/exclude_users_hint" /> </com.google.android.material.textfield.TextInputLayout> @@ -379,7 +399,7 @@ android:layout_height="wrap_content" android:fontFamily="?attr/font_family" android:textSize="?attr/font_default" - android:hint="@string/excludes_flairs_hint" /> + android:hint="@string/exclude_flairs_hint" /> </com.google.android.material.textfield.TextInputLayout> @@ -399,7 +419,7 @@ android:layout_height="wrap_content" android:fontFamily="?attr/font_family" android:textSize="?attr/font_default" - android:hint="@string/contains_flairs_hint" /> + android:hint="@string/contain_flairs_hint" /> </com.google.android.material.textfield.TextInputLayout> diff --git a/app/src/main/res/layout/activity_post_filter_preference.xml b/app/src/main/res/layout/activity_post_filter_preference.xml new file mode 100644 index 00000000..7db6ad95 --- /dev/null +++ b/app/src/main/res/layout/activity_post_filter_preference.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_preference_activity" + tools:context=".activities.PostFilterPreferenceActivity"> + + <com.google.android.material.appbar.AppBarLayout + android:id="@+id/appbar_layout_post_filter_preference_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_preference_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_preference_activity"> + + <androidx.appcompat.widget.Toolbar + android:id="@+id/toolbar_post_filter_preference_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_preference_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_preference_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/fragment_post_filter_options_bottom_sheet.xml b/app/src/main/res/layout/fragment_post_filter_options_bottom_sheet.xml new file mode 100644 index 00000000..a9c9310e --- /dev/null +++ b/app/src/main/res/layout/fragment_post_filter_options_bottom_sheet.xml @@ -0,0 +1,70 @@ +<?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_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/apply_to_text_view_post_filter_options_bottom_sheet_fragment" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/apply_post_filter_to" + 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_apply_to_24dp" + android:drawablePadding="48dp" + android:clickable="true" + android:focusable="true" + android:background="?attr/selectableItemBackground" /> + + <TextView + android:id="@+id/delete_text_view_post_filter_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/fragment_post_history.xml b/app/src/main/res/layout/fragment_post_history.xml index 9ed65c7f..325d74e1 100644 --- a/app/src/main/res/layout/fragment_post_history.xml +++ b/app/src/main/res/layout/fragment_post_history.xml @@ -4,8 +4,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" xmlns:app="http://schemas.android.com/apk/res-auto" - android:orientation="vertical" - tools:context=".settings.NsfwAndBlurringFragment"> + tools:context=".settings.PostHistoryFragment"> <LinearLayout android:layout_width="match_parent" diff --git a/app/src/main/res/layout/item_filter_fragment_header.xml b/app/src/main/res/layout/item_filter_fragment_header.xml new file mode 100644 index 00000000..af3b2b00 --- /dev/null +++ b/app/src/main/res/layout/item_filter_fragment_header.xml @@ -0,0 +1,25 @@ +<?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="wrap_content" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:orientation="vertical"> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:padding="16dp" + android:drawablePadding="32dp" + android:text="@string/restart_app_see_changes" + android:textColor="@color/settingsSubtitleColor" + android:gravity="center_vertical" + android:textSize="?attr/font_default" + android:fontFamily="?attr/font_family" + app:drawableStartCompat="@drawable/ic_info_preference_24dp" /> + + <View + android:layout_width="match_parent" + android:layout_height="1dp" + android:background="@color/dividerColor" /> + +</LinearLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/item_post_filter.xml b/app/src/main/res/layout/item_post_filter.xml new file mode 100644 index 00000000..62a5e886 --- /dev/null +++ b/app/src/main/res/layout/item_post_filter.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 |