Add back search filters from v3
This commit is contained in:
@@ -39,4 +39,18 @@
|
||||
android:layout_below="@+id/layout_view_toolbar"
|
||||
app:itemSpacing="@dimen/margin_normal" />
|
||||
</RelativeLayout>
|
||||
|
||||
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||
android:id="@+id/filter_fab"
|
||||
style="@style/Widget.MaterialComponents.ExtendedFloatingActionButton.Icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal|bottom"
|
||||
android:layout_marginBottom="@dimen/margin_normal"
|
||||
android:text="@string/action_filter"
|
||||
android:textAppearance="@style/TextAppearance.Aurora.SubTitle.Alt"
|
||||
android:textColor="@color/colorWhite"
|
||||
app:backgroundTint="@color/colorAccent"
|
||||
app:icon="@drawable/ic_filter"
|
||||
app:iconTint="@color/colorWhite" />
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
168
app/src/main/res/layout/sheet_filter.xml
Normal file
168
app/src/main/res/layout/sheet_filter.xml
Normal file
@@ -0,0 +1,168 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Aurora Store
|
||||
~ Copyright (C) 2021, Rahul Kumar Patel <whyorean@gmail.com>
|
||||
~
|
||||
~ Aurora Store is free software: you can redistribute it and/or modify
|
||||
~ it under the terms of the GNU General Public License as published by
|
||||
~ the Free Software Foundation, either version 2 of the License, or
|
||||
~ (at your option) any later version.
|
||||
~
|
||||
~ Aurora Store is distributed in the hope that it will be useful,
|
||||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
~ GNU General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License
|
||||
~ along with Aurora Store. If not, see <http://www.gnu.org/licenses/>.
|
||||
~
|
||||
-->
|
||||
|
||||
<RelativeLayout 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="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/txt_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/margin_normal"
|
||||
android:layout_marginBottom="@dimen/margin_small"
|
||||
android:paddingHorizontal="@dimen/margin_normal"
|
||||
android:text="@string/action_filter"
|
||||
android:textAppearance="@style/TextAppearance.Aurora.SubTitle.Alt" />
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_above="@id/layout_bottom"
|
||||
android:layout_below="@id/txt_title"
|
||||
android:padding="@dimen/padding_medium"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
tools:targetApi="o">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:text="@string/action_filter_misc"
|
||||
android:textAppearance="@style/TextAppearance.Aurora.SubTitle" />
|
||||
|
||||
<com.google.android.material.chip.ChipGroup
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
app:chipSpacingHorizontal="@dimen/margin_small"
|
||||
app:chipSpacingVertical="@dimen/margin_normal">
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/filter_gfs"
|
||||
style="@style/Widget.Aurora.Chip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/action_filter_gsf_dependent_apps" />
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/filter_paid"
|
||||
style="@style/Widget.Aurora.Chip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/action_filter_paid_apps" />
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/filter_ads"
|
||||
style="@style/Widget.Aurora.Chip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/action_filter_apps_with_ads" />
|
||||
|
||||
</com.google.android.material.chip.ChipGroup>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:text="@string/action_filter_rating"
|
||||
android:textAppearance="@style/TextAppearance.Aurora.SubTitle" />
|
||||
|
||||
<com.google.android.material.chip.ChipGroup
|
||||
android:id="@+id/rating_chips"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
app:chipSpacingHorizontal="@dimen/margin_small"
|
||||
app:chipSpacingVertical="@dimen/margin_xsmall"
|
||||
app:selectionRequired="true"
|
||||
app:singleSelection="true" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:text="@string/action_filter_downloads"
|
||||
android:textAppearance="@style/TextAppearance.Aurora.SubTitle" />
|
||||
|
||||
<com.google.android.material.chip.ChipGroup
|
||||
android:id="@+id/download_chips"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
app:chipSpacingHorizontal="@dimen/margin_small"
|
||||
app:chipSpacingVertical="@dimen/margin_xsmall"
|
||||
app:selectionRequired="true"
|
||||
app:singleSelection="true" />
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_bottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_positive"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/height_button"
|
||||
android:text="@string/action_filter_apply"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/btn_negative"
|
||||
app:layout_constraintTop_toBottomOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:rippleColor="@color/colorTransparent" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_negative"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/height_button"
|
||||
android:text="@string/action_close"
|
||||
android:textColor="@color/colorRed"
|
||||
app:layout_constraintEnd_toStartOf="@id/btn_positive"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:rippleColor="@color/colorTransparent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</RelativeLayout>
|
||||
@@ -71,14 +71,14 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:textAllCaps="false"
|
||||
android:text="@string/onboarding_tos" />
|
||||
android:text="@string/onboarding_tos"
|
||||
android:textAllCaps="false" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatCheckBox
|
||||
android:id="@+id/checkbox_accept"
|
||||
android:minHeight="0dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="0dp"
|
||||
android:text="@string/onboarding_tos_confirmation"
|
||||
android:textAppearance="@style/TextAppearance.Aurora.Line2" />
|
||||
</LinearLayout>
|
||||
|
||||
@@ -172,4 +172,49 @@
|
||||
<item>2</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="filterRatingValues" translatable="false">
|
||||
<item>0</item>
|
||||
<item>1.0</item>
|
||||
<item>2.0</item>
|
||||
<item>3.0</item>
|
||||
<item>4.0</item>
|
||||
<item>4.5</item>
|
||||
<item>4.7</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="filterRatingLabels" translatable="false">
|
||||
<item>@string/action_filter_all</item>
|
||||
<item> 1 + </item>
|
||||
<item> 2 + </item>
|
||||
<item> 3 + </item>
|
||||
<item> 4 + </item>
|
||||
<item> 4.5 + </item>
|
||||
<item> 4.7 + </item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="filterDownloadsValues" translatable="false">
|
||||
<item>0</item>
|
||||
<item>100</item>
|
||||
<item>1000</item>
|
||||
<item>10000</item>
|
||||
<item>50000</item>
|
||||
<item>100000</item>
|
||||
<item>1000000</item>
|
||||
<item>10000000</item>
|
||||
<item>50000000</item>
|
||||
<item>100000000</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="filterDownloadsLabels" translatable="false">
|
||||
<item>@string/action_filter_all</item>
|
||||
<item> > 100 </item>
|
||||
<item> > 1 K </item>
|
||||
<item> > 10 K </item>
|
||||
<item> > 50 K </item>
|
||||
<item> > 100 K </item>
|
||||
<item> > 1 M </item>
|
||||
<item> > 10 M </item>
|
||||
<item> > 50 M </item>
|
||||
<item> > 100 M </item>
|
||||
</string-array>
|
||||
</resources>
|
||||
|
||||
@@ -149,6 +149,7 @@
|
||||
<string name="details_more_about_app">"More about app"</string>
|
||||
<string name="details_no_ads">"No ads"</string>
|
||||
<string name="details_no_app">"No apps available"</string>
|
||||
<string name="details_no_app_match">"No app match found"</string>
|
||||
<string name="details_no_dependencies">"No Dependencies"</string>
|
||||
<string name="details_no_previews">"No previews available"</string>
|
||||
<string name="details_no_permission">"No permissions"</string>
|
||||
@@ -268,6 +269,8 @@
|
||||
<string name="pref_filter_fdroid_title">"Filter F-Droid apps"</string>
|
||||
<string name="pref_filter_google_summary">"Removes all Google Apps from search results and category apps"</string>
|
||||
<string name="pref_filter_google_title">"Filter Google apps"</string>
|
||||
<string name="pref_filter_search_summary">"Search filters are reset on each search. Turn off to save search filters"</string>
|
||||
<string name="pref_filter_search_title">"Use non-persistent search filter"</string>
|
||||
<string name="pref_insecure_anonymous_summary">"Generate GSF ID locally on device"</string>
|
||||
<string name="pref_insecure_anonymous_title">"Insecure anonymous session"</string>
|
||||
<string name="pref_install_auto_summary">"Apps are installed instantly after download completes"</string>
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
<item name="scrimBlack">@color/colorScrimBlack</item>
|
||||
<item name="colorShimmer">@color/colorShimmer</item>
|
||||
<item name="colorStroke">@color/colorStroke</item>
|
||||
<item name="chipStyle">@style/Widget.Aurora.Chip</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.Light" parent="Theme.MaterialComponents.Light.NoActionBar">
|
||||
@@ -45,6 +46,7 @@
|
||||
<item name="scrimBlack">@color/colorScrimBlack</item>
|
||||
<item name="colorShimmer">@color/colorShimmer</item>
|
||||
<item name="colorStroke">@color/colorStroke</item>
|
||||
<item name="chipStyle">@style/Widget.Aurora.Chip</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.Dark" parent="Theme.MaterialComponents.NoActionBar">
|
||||
@@ -62,6 +64,7 @@
|
||||
<item name="scrimBlack">@color/colorScrimBlack</item>
|
||||
<item name="colorShimmer">@color/colorShimmerDark</item>
|
||||
<item name="colorStroke">@color/colorStrokeDark</item>
|
||||
<item name="chipStyle">@style/Widget.Aurora.Chip</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.DarkX" parent="AppTheme.Dark">
|
||||
|
||||
@@ -32,4 +32,11 @@
|
||||
app:key="PREFERENCE_FILTER_FDROID"
|
||||
app:summary="@string/pref_filter_fdroid_summary"
|
||||
app:title="@string/pref_filter_fdroid_title" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
app:defaultValue="true"
|
||||
app:iconSpaceReserved="false"
|
||||
app:key="PREFERENCE_FILTER_SEARCH"
|
||||
app:summary="@string/pref_filter_search_summary"
|
||||
app:title="@string/pref_filter_search_title" />
|
||||
</PreferenceScreen>
|
||||
Reference in New Issue
Block a user