Skip to content

Commit

Permalink
Updated Settings screen to match new desgns
Browse files Browse the repository at this point in the history
  • Loading branch information
aanorbel committed Nov 4, 2023
1 parent 30d799b commit 4f9e134
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 59 deletions.
40 changes: 20 additions & 20 deletions app/src/fdroid/res/xml/preferences_global.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,27 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:key="@string/preferences"
android:title="@string/Settings_Title">
<PreferenceScreen
android:icon="@drawable/automated_testing"
android:key="@string/automated_testing"
android:title="@string/Settings_AutomatedTesting_Label">
<SwitchPreferenceCompat
android:defaultValue="false"
android:key="@string/automated_testing_enabled"
android:title="@string/Settings_AutomatedTesting_RunAutomatically" />
<SwitchPreferenceCompat
android:defaultValue="true"
android:dependency="@string/automated_testing_enabled"
android:key="@string/automated_testing_wifionly"
android:title="@string/Settings_AutomatedTesting_RunAutomatically_WiFiOnly" />
<SwitchPreferenceCompat
android:defaultValue="true"
android:dependency="@string/automated_testing_enabled"
android:key="@string/automated_testing_charging"
android:title="@string/Settings_AutomatedTesting_RunAutomatically_ChargingOnly" />
<PreferenceCategory android:title="@string/Settings_AutomatedTesting_RunAutomatically_Footer" />
</PreferenceScreen>
<PreferenceScreen
android:icon="@drawable/test_options"
android:key="@string/test_options"
android:title="@string/Settings_TestOptions_Label">
<SwitchPreferenceCompat
android:defaultValue="false"
android:key="@string/automated_testing_enabled"
android:title="@string/Settings_AutomatedTesting_RunAutomatically"
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
android:defaultValue="true"
android:dependency="@string/automated_testing_enabled"
android:key="@string/automated_testing_wifionly"
android:title="@string/Settings_AutomatedTesting_RunAutomatically_WiFiOnly"
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
android:defaultValue="true"
android:dependency="@string/automated_testing_enabled"
android:key="@string/automated_testing_charging"
android:title="@string/Settings_AutomatedTesting_RunAutomatically_ChargingOnly"
app:iconSpaceReserved="false" />
<PreferenceScreen
android:key="@string/Settings_Websites_Categories_Label"
android:title="@string/Settings_Websites_Categories_Label"
Expand Down Expand Up @@ -228,6 +225,9 @@
android:key="@string/max_runtime"
android:title="@string/Settings_Websites_MaxRuntime"
app:iconSpaceReserved="false" />
<PreferenceCategory
android:title="@string/Settings_AutomatedTesting_RunAutomatically_Footer"
app:iconSpaceReserved="false" />
</PreferenceScreen>
<PreferenceScreen
android:icon="@drawable/privacy"
Expand Down
36 changes: 19 additions & 17 deletions app/src/main/res/layout/fragment_content.xml
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
<?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">
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".fragment.PreferenceGlobalFragment">

<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">

<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize" />
</com.google.android.material.appbar.AppBarLayout>
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize" />
</com.google.android.material.appbar.AppBarLayout>

<FrameLayout
android:id="@+id/subContent"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
<FrameLayout
android:id="@+id/subContent"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
44 changes: 22 additions & 22 deletions app/src/main/res/xml/preferences_global.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,28 @@
android:title="@string/Modal_EnableNotifications_Paragraph"
app:iconSpaceReserved="false" />
</PreferenceScreen>
<PreferenceScreen
android:icon="@drawable/automated_testing"
android:key="@string/automated_testing"
android:title="@string/Settings_AutomatedTesting_Label">
<SwitchPreferenceCompat
android:defaultValue="false"
android:key="@string/automated_testing_enabled"
android:title="@string/Settings_AutomatedTesting_RunAutomatically" />
<SwitchPreferenceCompat
android:defaultValue="true"
android:dependency="@string/automated_testing_enabled"
android:key="@string/automated_testing_wifionly"
android:title="@string/Settings_AutomatedTesting_RunAutomatically_WiFiOnly" />
<SwitchPreferenceCompat
android:defaultValue="true"
android:dependency="@string/automated_testing_enabled"
android:key="@string/automated_testing_charging"
android:title="@string/Settings_AutomatedTesting_RunAutomatically_ChargingOnly" />
<PreferenceCategory android:title="@string/Settings_AutomatedTesting_RunAutomatically_Footer" />
</PreferenceScreen>
<PreferenceScreen
android:icon="@drawable/test_options"
android:key="@string/test_options"
android:title="@string/Settings_TestOptions_Label">
<PreferenceScreen
<SwitchPreferenceCompat
android:defaultValue="false"
android:key="@string/automated_testing_enabled"
android:title="@string/Settings_AutomatedTesting_RunAutomatically"
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
android:defaultValue="true"
android:dependency="@string/automated_testing_enabled"
android:key="@string/automated_testing_wifionly"
android:title="@string/Settings_AutomatedTesting_RunAutomatically_WiFiOnly"
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
android:defaultValue="true"
android:dependency="@string/automated_testing_enabled"
android:key="@string/automated_testing_charging"
android:title="@string/Settings_AutomatedTesting_RunAutomatically_ChargingOnly"
app:iconSpaceReserved="false" />
<PreferenceScreen
android:key="@string/Settings_Websites_Categories_Label"
android:title="@string/Settings_Websites_Categories_Label"
app:iconSpaceReserved="false">
Expand Down Expand Up @@ -234,7 +231,10 @@
android:key="@string/max_runtime"
android:title="@string/Settings_Websites_MaxRuntime"
app:iconSpaceReserved="false" />
</PreferenceScreen>
<PreferenceCategory
android:title="@string/Settings_AutomatedTesting_RunAutomatically_Footer"
app:iconSpaceReserved="false" />
</PreferenceScreen>
<PreferenceScreen
android:icon="@drawable/privacy"
android:key="@string/privacy"
Expand Down

0 comments on commit 4f9e134

Please sign in to comment.