Settings: Migrate all preferences to navigation components
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!--
|
||||
~ Aurora Store
|
||||
~ Copyright (C) 2021, Rahul Kumar Patel <whyorean@gmail.com>
|
||||
@@ -20,18 +19,26 @@
|
||||
-->
|
||||
|
||||
<LinearLayout 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:orientation="vertical"
|
||||
tools:context=".view.ui.preferences.SettingsFragment">
|
||||
|
||||
<include
|
||||
android:id="@+id/layout_toolbar_action"
|
||||
layout="@layout/view_toolbar_native" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/settings"
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
android:layout_height="wrap_content"
|
||||
app:navigationIcon="@drawable/ic_arrow_back" />
|
||||
|
||||
<!--
|
||||
Required ViewGroup for PreferenceFragmentCompat
|
||||
False positive for id not in API < 24
|
||||
-->
|
||||
<FrameLayout
|
||||
android:id="@android:id/list_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:targetApi="n" />
|
||||
</LinearLayout>
|
||||
@@ -77,6 +77,41 @@
|
||||
android:name="com.aurora.store.view.ui.preferences.SettingsFragment"
|
||||
android:label="@string/title_settings"
|
||||
tools:layout="@layout/fragment_setting" />
|
||||
<fragment
|
||||
android:id="@+id/advancedPreference"
|
||||
android:name="com.aurora.store.view.ui.preferences.AdvancedPreference"
|
||||
android:label="AdvancedPreference"
|
||||
tools:layout="@layout/fragment_setting" />
|
||||
<fragment
|
||||
android:id="@+id/downloadPreference"
|
||||
android:name="com.aurora.store.view.ui.preferences.DownloadPreference"
|
||||
android:label="DownloadPreference"
|
||||
tools:layout="@layout/fragment_setting" />
|
||||
<fragment
|
||||
android:id="@+id/filterPreference"
|
||||
android:name="com.aurora.store.view.ui.preferences.FilterPreference"
|
||||
android:label="FilterPreference"
|
||||
tools:layout="@layout/fragment_setting" />
|
||||
<fragment
|
||||
android:id="@+id/installationPreference"
|
||||
android:name="com.aurora.store.view.ui.preferences.InstallationPreference"
|
||||
android:label="InstallationPreference"
|
||||
tools:layout="@layout/fragment_setting" />
|
||||
<fragment
|
||||
android:id="@+id/networkPreference"
|
||||
android:name="com.aurora.store.view.ui.preferences.NetworkPreference"
|
||||
android:label="NetworkPreference"
|
||||
tools:layout="@layout/fragment_setting" />
|
||||
<fragment
|
||||
android:id="@+id/UIPreference"
|
||||
android:name="com.aurora.store.view.ui.preferences.UIPreference"
|
||||
android:label="UIPreference"
|
||||
tools:layout="@layout/fragment_setting" />
|
||||
<fragment
|
||||
android:id="@+id/updatesPreference"
|
||||
android:name="com.aurora.store.view.ui.preferences.UpdatesPreference"
|
||||
android:label="UpdatesPreference"
|
||||
tools:layout="@layout/fragment_setting" />
|
||||
<fragment
|
||||
android:id="@+id/searchSuggestionFragment"
|
||||
android:name="com.aurora.store.view.ui.search.SearchSuggestionFragment"
|
||||
|
||||
@@ -104,6 +104,7 @@
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.PreferenceThemeOverlay" parent="@style/PreferenceThemeOverlay">
|
||||
<item name="android:layout">@layout/fragment_setting</item>
|
||||
<item name="switchPreferenceCompatStyle">@style/AppTheme.SwitchPreference</item>
|
||||
</style>
|
||||
|
||||
|
||||
@@ -17,17 +17,14 @@
|
||||
~
|
||||
-->
|
||||
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<PreferenceScreen xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<Preference
|
||||
android:fragment="com.aurora.store.view.ui.preferences.FilterPreference"
|
||||
app:icon="@drawable/ic_filter"
|
||||
app:key="pref_filter"
|
||||
app:layout="@layout/item_preference"
|
||||
app:title="@string/action_filter" />
|
||||
|
||||
<Preference
|
||||
android:fragment="com.aurora.store.view.ui.preferences.InstallationPreference"
|
||||
app:icon="@drawable/ic_installation"
|
||||
app:iconSpaceReserved="false"
|
||||
app:key="pref_install"
|
||||
@@ -35,7 +32,6 @@
|
||||
app:title="@string/title_installation" />
|
||||
|
||||
<Preference
|
||||
android:fragment="com.aurora.store.view.ui.preferences.UIPreference"
|
||||
app:icon="@drawable/ic_ui"
|
||||
app:iconSpaceReserved="false"
|
||||
app:key="pref_ui"
|
||||
@@ -43,7 +39,6 @@
|
||||
app:title="@string/pref_ui_title" />
|
||||
|
||||
<Preference
|
||||
android:fragment="com.aurora.store.view.ui.preferences.DownloadPreference"
|
||||
app:icon="@drawable/ic_download_manager"
|
||||
app:iconSpaceReserved="false"
|
||||
app:key="pref_download"
|
||||
@@ -51,7 +46,6 @@
|
||||
app:title="@string/pref_app_download" />
|
||||
|
||||
<Preference
|
||||
android:fragment="com.aurora.store.view.ui.preferences.NetworkPreference"
|
||||
app:icon="@drawable/ic_network"
|
||||
app:iconSpaceReserved="false"
|
||||
app:key="pref_network"
|
||||
@@ -59,15 +53,13 @@
|
||||
app:title="@string/pref_network_title" />
|
||||
|
||||
<Preference
|
||||
android:fragment="com.aurora.store.view.ui.preferences.UpdatesPreference"
|
||||
app:icon="@drawable/ic_updates"
|
||||
app:iconSpaceReserved="false"
|
||||
app:key="pref_network"
|
||||
app:key="pref_updates"
|
||||
app:layout="@layout/item_preference"
|
||||
app:title="@string/title_updates" />
|
||||
|
||||
<Preference
|
||||
android:fragment="com.aurora.store.view.ui.preferences.AdvancedPreference"
|
||||
app:icon="@drawable/ic_tune"
|
||||
app:iconSpaceReserved="false"
|
||||
app:key="pref_advanced"
|
||||
Reference in New Issue
Block a user