Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved Settings screen #716

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions org.envirocar.app/res/drawable/ic_auto_connect_24.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="36dp"
android:height="36dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M20,5V4c0,-0.55 -0.45,-1 -1,-1h-2c-0.55,0 -1,0.45 -1,1v1h-1v4c0,0.55 0.45,1 1,1h1v7c0,1.1 -0.9,2 -2,2s-2,-0.9 -2,-2V7c0,-2.21 -1.79,-4 -4,-4S5,4.79 5,7v7H4c-0.55,0 -1,0.45 -1,1v4h1v1c0,0.55 0.45,1 1,1h2c0.55,0 1,-0.45 1,-1v-1h1v-4c0,-0.55 -0.45,-1 -1,-1H7V7c0,-1.1 0.9,-2 2,-2s2,0.9 2,2v10c0,2.21 1.79,4 4,4s4,-1.79 4,-4v-7h1c0.55,0 1,-0.45 1,-1V5H20z"
android:fillColor="#000000"/>
</vector>
9 changes: 9 additions & 0 deletions org.envirocar.app/res/drawable/ic_auto_record_24.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="36dp"
android:height="36dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M18,8c0,-3.31 -2.69,-6 -6,-6S6,4.69 6,8c0,4.5 6,11 6,11s6,-6.5 6,-11zM10,8c0,-1.1 0.9,-2 2,-2s2,0.9 2,2 -0.89,2 -2,2c-1.1,0 -2,-0.9 -2,-2zM5,20v2h14v-2L5,20z"
android:fillColor="#000000"/>
</vector>
9 changes: 9 additions & 0 deletions org.envirocar.app/res/drawable/ic_automatic_upload_24.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="36dp"
android:height="36dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M19.35,10.04C18.67,6.59 15.64,4 12,4 9.11,4 6.6,5.64 5.35,8.04 2.34,8.36 0,10.91 0,14c0,3.31 2.69,6 6,6h13c2.76,0 5,-2.24 5,-5 0,-2.64 -2.05,-4.78 -4.65,-4.96zM19,18H6c-2.21,0 -4,-1.79 -4,-4 0,-2.05 1.53,-3.76 3.56,-3.97l1.07,-0.11 0.5,-0.95C8.08,7.14 9.94,6 12,6c2.62,0 4.88,1.86 5.39,4.43l0.3,1.5 1.53,0.11c1.56,0.1 2.78,1.41 2.78,2.96 0,1.65 -1.35,3 -3,3zM8,13h2.55v3h2.9v-3H16l-4,-4z"
android:fillColor="#000000"/>
</vector>
9 changes: 9 additions & 0 deletions org.envirocar.app/res/drawable/ic_debug_logging_24.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="36dp"
android:height="36dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M20,8h-2.81c-0.45,-0.78 -1.07,-1.45 -1.82,-1.96L17,4.41 15.59,3l-2.17,2.17C12.96,5.06 12.49,5 12,5c-0.49,0 -0.96,0.06 -1.41,0.17L8.41,3 7,4.41l1.62,1.63C7.88,6.55 7.26,7.22 6.81,8L4,8v2h2.09c-0.05,0.33 -0.09,0.66 -0.09,1v1L4,12v2h2v1c0,0.34 0.04,0.67 0.09,1L4,16v2h2.81c1.04,1.79 2.97,3 5.19,3s4.15,-1.21 5.19,-3L20,18v-2h-2.09c0.05,-0.33 0.09,-0.66 0.09,-1v-1h2v-2h-2v-1c0,-0.34 -0.04,-0.67 -0.09,-1L20,10L20,8zM14,16h-4v-2h4v2zM14,12h-4v-2h4v2z"
android:fillColor="#000000"/>
</vector>
9 changes: 9 additions & 0 deletions org.envirocar.app/res/drawable/ic_diesel_consumption_24.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="36dp"
android:height="36dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M19.77,7.23l0.01,-0.01 -3.72,-3.72L15,4.56l2.11,2.11c-0.94,0.36 -1.61,1.26 -1.61,2.33 0,1.38 1.12,2.5 2.5,2.5 0.36,0 0.69,-0.08 1,-0.21v7.21c0,0.55 -0.45,1 -1,1s-1,-0.45 -1,-1L17,14c0,-1.1 -0.9,-2 -2,-2h-1L14,5c0,-1.1 -0.9,-2 -2,-2L6,3c-1.1,0 -2,0.9 -2,2v16h10v-7.5h1.5v5c0,1.38 1.12,2.5 2.5,2.5s2.5,-1.12 2.5,-2.5L20.5,9c0,-0.69 -0.28,-1.32 -0.73,-1.77zM12,10L6,10L6,5h6v5zM18,10c-0.55,0 -1,-0.45 -1,-1s0.45,-1 1,-1 1,0.45 1,1 -0.45,1 -1,1z"
android:fillColor="#000000"/>
</vector>
9 changes: 9 additions & 0 deletions org.envirocar.app/res/drawable/ic_discovery_interval_24.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="36dp"
android:height="36dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M20,19.59V8l-6,-6H6c-1.1,0 -1.99,0.9 -1.99,2L4,20c0,1.1 0.89,2 1.99,2H18c0.45,0 0.85,-0.15 1.19,-0.4l-4.43,-4.43c-0.8,0.52 -1.74,0.83 -2.76,0.83 -2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5c0,1.02 -0.31,1.96 -0.83,2.75L20,19.59zM9,13c0,1.66 1.34,3 3,3s3,-1.34 3,-3 -1.34,-3 -3,-3 -3,1.34 -3,3z"
android:fillColor="#000000"/>
</vector>
9 changes: 9 additions & 0 deletions org.envirocar.app/res/drawable/ic_gps_track_24.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="36dp"
android:height="36dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M12,8c-2.21,0 -4,1.79 -4,4s1.79,4 4,4 4,-1.79 4,-4 -1.79,-4 -4,-4zM20.94,11c-0.46,-4.17 -3.77,-7.48 -7.94,-7.94L13,1h-2v2.06C6.83,3.52 3.52,6.83 3.06,11L1,11v2h2.06c0.46,4.17 3.77,7.48 7.94,7.94L11,23h2v-2.06c4.17,-0.46 7.48,-3.77 7.94,-7.94L23,13v-2h-2.06zM12,19c-3.87,0 -7,-3.13 -7,-7s3.13,-7 7,-7 7,3.13 7,7 -3.13,7 -7,7z"
android:fillColor="#000000"/>
</vector>
9 changes: 9 additions & 0 deletions org.envirocar.app/res/drawable/ic_keep_screen_on_24.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="36dp"
android:height="36dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M17,1.01L7,1C5.9,1 5,1.9 5,3v18c0,1.1 0.9,2 2,2h10c1.1,0 2,-0.9 2,-2V3C19,1.9 18.1,1.01 17,1.01zM17,18H7V6h10V18zM8,10h8v1.5H8V10zM9,13h6v1.5H9V13z"
android:fillColor="#000000"/>
</vector>
9 changes: 9 additions & 0 deletions org.envirocar.app/res/drawable/ic_sampling_rate_24.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="36dp"
android:height="36dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M16,6l2.29,2.29 -4.88,4.88 -4,-4L2,16.59 3.41,18l6,-6 4,4 6.3,-6.29L22,12V6z"
android:fillColor="#000000"/>
</vector>
4 changes: 4 additions & 0 deletions org.envirocar.app/res/drawable/ic_start_destination_24.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<vector android:height="36dp" android:viewportHeight="24"
android:viewportWidth="24" android:width="36dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#000000" android:pathData="M12,10.9c-0.61,0 -1.1,0.49 -1.1,1.1s0.49,1.1 1.1,1.1c0.61,0 1.1,-0.49 1.1,-1.1s-0.49,-1.1 -1.1,-1.1zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM14.19,14.19L6,18l3.81,-8.19L18,6l-3.81,8.19z"/>
</vector>
6 changes: 6 additions & 0 deletions org.envirocar.app/res/drawable/ic_track_trim_24.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<vector android:height="36dp" android:viewportHeight="455.416"
android:viewportWidth="455.416" android:width="36dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M235.968,52.552c0.39,9.688 0.778,19.376 1.169,29.064c-7.543,0 -11.313,0 -18.855,0c0.389,-9.688 0.779,-19.376 1.167,-29.064c-15.295,0 -30.589,0 -45.884,0c-30.747,116.771 -61.499,233.539 -92.245,350.312c41.352,0 82.704,0 124.055,0c0.389,-9.689 0.778,-19.377 1.168,-29.064c14.111,0 28.222,0 42.332,0c0.392,9.688 0.78,19.375 1.168,29.064c41.352,0 82.703,0 124.055,0c-30.747,-116.771 -61.498,-233.54 -92.245,-350.312C266.559,52.552 251.264,52.552 235.968,52.552zM216.531,125.133c7.451,0 14.902,-0.004 22.354,-0.002c1.082,26.939 2.163,53.88 3.247,80.818c-9.616,0 -19.231,0 -28.848,0C214.37,179.012 215.45,152.072 216.531,125.133zM208.29,330.282c1.081,-26.938 2.165,-53.877 3.247,-80.815c10.781,0 21.562,-0.002 32.342,-0.002c1.083,26.938 2.166,53.879 3.247,80.817C234.182,330.282 221.235,330.282 208.29,330.282z"/>
<path android:fillColor="#FF000000" android:pathData="M311.929,52.552c-6.248,0 -9.373,0 -15.621,0c38.961,116.771 77.913,233.541 116.876,350.312c14.077,0 28.155,0 42.232,0C407.589,286.091 359.759,169.323 311.929,52.552z"/>
<path android:fillColor="#FF000000" android:pathData="M143.487,52.552C95.657,169.324 47.826,286.091 0,402.864c14.078,0 28.155,0 42.233,0c38.958,-116.771 77.915,-233.54 116.875,-350.312C152.86,52.552 149.735,52.552 143.487,52.552z"/>
</vector>
9 changes: 9 additions & 0 deletions org.envirocar.app/res/drawable/ic_verbal_announcement_24.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="36dp"
android:height="36dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M18,11v2h4v-2h-4zM16,17.61c0.96,0.71 2.21,1.65 3.2,2.39 0.4,-0.53 0.8,-1.07 1.2,-1.6 -0.99,-0.74 -2.24,-1.68 -3.2,-2.4 -0.4,0.54 -0.8,1.08 -1.2,1.61zM20.4,5.6c-0.4,-0.53 -0.8,-1.07 -1.2,-1.6 -0.99,0.74 -2.24,1.68 -3.2,2.4 0.4,0.53 0.8,1.07 1.2,1.6 0.96,-0.72 2.21,-1.65 3.2,-2.4zM4,9c-1.1,0 -2,0.9 -2,2v2c0,1.1 0.9,2 2,2h1v4h2v-4h1l5,3L13,6L8,9L4,9zM15.5,12c0,-1.33 -0.58,-2.53 -1.5,-3.35v6.69c0.92,-0.81 1.5,-2.01 1.5,-3.34z"
android:fillColor="#000000"/>
</vector>
12 changes: 12 additions & 0 deletions org.envirocar.app/res/xml/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,19 @@
android:key="@string/prefkey_automatic_upload"
android:summary="@string/pref_automatic_upload_sub"
android:title="@string/pref_automatic_upload"
android:icon="@drawable/ic_automatic_upload_24"
app:iconSpaceReserved="false" />
<CheckBoxPreference
android:key="@string/prefkey_display_always_active"
android:summary="@string/pref_display_always_activ_sub"
android:title="@string/pref_display_always_activ"
android:icon="@drawable/ic_keep_screen_on_24"
app:iconSpaceReserved="false" />
<CheckBoxPreference
android:key="@string/prefkey_text_to_speech"
android:summary="@string/pref_text_to_speech_summary"
android:title="@string/pref_text_to_speech"
android:icon="@drawable/ic_verbal_announcement_24"
app:iconSpaceReserved="false" />
<!-- <CheckBoxPreference-->
<!-- android:enabled="false"-->
Expand All @@ -53,6 +56,7 @@
android:key="@string/prefkey_privacy"
android:summary="@string/pref_obfuscate_track_summary"
android:title="@string/pref_obfuscate_track"
android:icon="@drawable/ic_start_destination_24"
app:iconSpaceReserved="false" />
<org.envirocar.app.views.settings.custom.SamplingRatePreference
android:defaultValue="5"
Expand All @@ -61,6 +65,7 @@
android:maxLength="8"
android:summary="@string/sampling_rate_summary"
android:title="@string/sampling_rate_title"
android:icon="@drawable/ic_sampling_rate_24"
app:iconSpaceReserved="false" />
</PreferenceCategory>

Expand All @@ -71,17 +76,20 @@
android:key="@string/prefkey_automatic_recording"
android:summary="@string/pref_bluetooth_auto_connect_summary"
android:title="@string/pref_bluetooth_auto_connect"
android:icon="@drawable/ic_auto_connect_24"
app:iconSpaceReserved="false" />
<org.envirocar.app.views.settings.custom.AutoConnectIntervalPreference
android:defaultValue="60"
android:key="@string/prefkey_search_interval"
android:summary="@string/pref_bluetooth_discovery_interval_summary"
android:title="@string/pref_bluetooth_discovery_interval"
android:icon="@drawable/ic_discovery_interval_24"
app:iconSpaceReserved="false" />
<CheckBoxPreference
android:key="@string/prefkey_enable_diesel_consumption"
android:summary="@string/preference_beta_diesel_consumption_sum"
android:title="@string/preference_beta_diesel_consumption"
android:icon="@drawable/ic_diesel_consumption_24"
app:iconSpaceReserved="false" />
</PreferenceCategory>
<PreferenceCategory
Expand All @@ -92,18 +100,21 @@
android:key="@string/prefkey_enable_gps_based_track_recording"
android:summary="@string/preference_beta_enable_gps_based_track_recording_sum"
android:title="@string/preference_beta_enable_gps_based_track_recording"
android:icon="@drawable/ic_gps_track_24"
app:iconSpaceReserved="false" />
<CheckBoxPreference
android:defaultValue="false"
android:key="@string/prefkey_gps_mode_ar"
android:summary="@string/pref_gps_mode_ar_summary"
android:title="@string/pref_gps_mode_ar_title"
android:icon="@drawable/ic_auto_record_24"
app:iconSpaceReserved="false" />
<org.envirocar.app.views.settings.custom.GPSTrimDurationPreference
android:defaultValue="110"
android:key="@string/prefkey_track_trim_duration"
android:summary="@string/pref_track_cut_duration_summary"
android:title="@string/pref_track_cut_duration"
android:icon="@drawable/ic_track_trim_24"
app:iconSpaceReserved="false" />
</PreferenceCategory>

Expand All @@ -114,6 +125,7 @@
android:key="@string/prefkey_enable_debug_logging"
android:summary="@string/enable_debug_logging_summary"
android:title="@string/enable_debug_logging"
android:icon="@drawable/ic_debug_logging_24"
app:iconSpaceReserved="false" />
</PreferenceCategory>

Expand Down