Skip to content

Commit

Permalink
feat: Cleanup "graph" related preferences
Browse files Browse the repository at this point in the history
  • Loading branch information
tzebrowski committed Jun 1, 2024
1 parent 2d37c23 commit 76f0307
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 50 deletions.
12 changes: 6 additions & 6 deletions app/src/main/res/layout/fragment_graph.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_marginEnd="4dp"
android:text="@string/graph_view.virtual_screen_1"
android:text="@string/pref.graph.view.virtual_screen_1"
android:textSize="10dp" />

<Button
Expand All @@ -35,7 +35,7 @@
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_marginEnd="4dp"
android:text="@string/graph_view.virtual_screen_2"
android:text="@string/pref.graph.view.virtual_screen_2"
android:textSize="10dp" />

<Button
Expand All @@ -44,7 +44,7 @@
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_marginEnd="4dp"
android:text="@string/graph_view.virtual_screen_3"
android:text="@string/pref.graph.view.virtual_screen_3"
android:textSize="10dp" />

<Button
Expand All @@ -53,7 +53,7 @@
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_marginEnd="4dp"
android:text="@string/graph_view.virtual_screen_4"
android:text="@string/pref.graph.view.virtual_screen_4"
android:textSize="10dp" />

<Button
Expand All @@ -62,7 +62,7 @@
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_marginEnd="4dp"
android:text="@string/graph_view.virtual_screen_5"
android:text="@string/pref.graph.view.virtual_screen_5"
android:textSize="10dp" />

<Button
Expand All @@ -71,7 +71,7 @@
android:layout_height="36dp"
android:layout_marginEnd="4dp"
android:backgroundTint="@color/transparent"
android:text="@string/graph_view.virtual_screen_reserved"
android:text="@string/pref.graph.view.virtual_screen_reserved"
android:textSize="10dp" />
</LinearLayout>

Expand Down
16 changes: 8 additions & 8 deletions app/src/main/res/menu/context_menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,35 +35,35 @@

<item
android:id="@+id/ctx_menu_submenu_filters"
android:title="@string/graph_view.filters_based_on_giulia_screen">
android:title="@string/pref.graph.view.filters_based_on_giulia_screen">
<menu>
<item
android:id="@+id/ctx_menu_submenu_filters_filter_1"
android:title="@string/graph_view.filters_filter_1"/>
android:title="@string/pref.graph.view.filters_filter_1"/>

<item
android:id="@+id/ctx_menu_submenu_filters_filter_2"
android:title="@string/graph_view.filters_filter_2"/>
android:title="@string/pref.graph.view.filters_filter_2"/>

<item
android:id="@+id/ctx_menu_submenu_filters_filter_3"
android:title="@string/graph_view.filters_filter_3"/>
android:title="@string/pref.graph.view.filters_filter_3"/>

<item
android:id="@+id/ctx_menu_submenu_filters_filter_4"
android:title="@string/graph_view.filters_filter_4"/>
android:title="@string/pref.graph.view.filters_filter_4"/>

<item
android:id="@+id/ctx_menu_submenu_filters_filter_5"
android:title="@string/graph_view.filters_filter_5"/>
android:title="@string/pref.graph.view.filters_filter_5"/>

<item
android:id="@+id/ctx_menu_submenu_filters_filter_6"
android:title="@string/graph_view.filters_filter_6"/>
android:title="@string/pref.graph.view.filters_filter_6"/>

<item
android:id="@+id/ctx_menu_submenu_filters_filter_7"
android:title="@string/graph_view.filters_filter_7"/>
android:title="@string/pref.graph.view.filters_filter_7"/>

</menu>

Expand Down
51 changes: 26 additions & 25 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,10 @@
<string name="pref.drag_racing.virtual_screens.number_of_items_in_column.category">Number of items in the column</string>
<string name="pref.drag_racing.font_size">Font size of items on the screen</string>

<string name="pref.graph_category">Graph view configuration</string>
<string name="pref.gauge_category">Gauge view configuration</string>
<string name="pref.aa_category">Android Auto view configuration</string>
<string name="pref.aa_category_summary">This page collects Android Auto specific configuration parameters.</string>
<string name="pref.graph.category">Graph view configuration</string>
<string name="pref.gauge.category">Gauge view configuration</string>
<string name="pref.aa.category">Android Auto view configuration</string>
<string name="pref.aa.category_summary">This page collects Android Auto specific configuration parameters.</string>

<string name="pref.adapter_category">OBD2 Adapter Settings</string>
<string name="pref.bluetooth_category">Bluetooth</string>
Expand Down Expand Up @@ -279,18 +279,33 @@

<string name="pref.enable_view_summary">Enabling this option will cause additionally button appear on the task bar which shortcuts to the view</string>
<string name="pref.enable_view">Show view shortcut on the taskbar</string>
<string name="pref.trips_recordings_display_info">Display trip info</string>

<string name="pref.graph_trips_selected">Manage recorded trips</string>
<string name="pref.graph_trips_selected_summary">Manage recorded Trips.\nYou are allowed to load or delete existing trip</string>
<string name="pref.trips_recordings_save_short_trip">Record trips shorten than 5s length (engine start)</string>
<string name="pref.graph_x_axis_start_moving_after_time">X-Axis start moving after</string>
<string name="pref.graph_x_axis_minimum_shift_time">X-Axis moving time</string>
<string name="pref.graph.trips_recordings_display_info">Display trip info</string>
<string name="pref.graph.trips_recordings_save_short_trip">Record trips shorten than 5s length (engine start)</string>
<string name="pref.graph.x_axis_start_moving_after_time">X-Axis start moving after</string>
<string name="pref.graph.x_axis_minimum_shift_time">X-Axis moving time</string>
<string name="pref.graph_cache_enabled">Cache enabled</string>
<string name="pref.graph.filter_source">Filter source. Use this parameter to configure \"Filters\" quick menu.</string>
<string name="pref.graph.trips_selected">Manage recorded trips</string>
<string name="pref.graph.trips_selected_summary">Manage recorded Trips.\nYou are allowed to load or delete existing trip</string>

<string name="pref.graph.view.virtual_screen_2">2</string>
<string name="pref.graph.view.virtual_screen_3">3</string>
<string name="pref.graph.view.virtual_screen_1">1</string>
<string name="pref.graph.view.virtual_screen_4">4</string>
<string name="pref.graph.view.virtual_screen_5">5</string>
<string name="pref.graph.view.virtual_screen_reserved">Reserved</string>
<string name="pref.graph.view.filters_based_on_giulia_screen">Filters</string>
<string name="pref.graph.view.filters_filter_1">Filter 1</string>
<string name="pref.graph.view.filters_filter_2">Filter 2</string>
<string name="pref.graph.view.filters_filter_3">Filter 3</string>
<string name="pref.graph.view.filters_filter_4">Filter 4</string>
<string name="pref.graph.view.filters_filter_5">Filter 5</string>
<string name="pref.graph.view.filters_filter_6">Filter 6</string>
<string name="pref.graph.view.filters_filter_7">Filter 7</string>

<string name="pref.debug_broadcast_fake_metrics">Enable data generator</string>

<string name="pref.debug_broadcast_fake_metrics">Enable data generator</string>
<string name="pref.debug_trip_save_connector_response">Save connector response</string>
<string name="pref.debug_logging_enabled">Enable debug logging</string>
<string name="pref.debug_generator_enabled">Enable data generator through obd-metrics</string>
Expand Down Expand Up @@ -406,20 +421,6 @@
<string name="dialog_save_action">Save\n </string>
<string name="pids_supported">Supported</string>
<string name="pref_search_view_title">Search</string>
<string name="graph_view.virtual_screen_2">2</string>
<string name="graph_view.virtual_screen_3">3</string>
<string name="graph_view.virtual_screen_1">1</string>
<string name="graph_view.virtual_screen_4">4</string>
<string name="graph_view.virtual_screen_5">5</string>
<string name="graph_view.virtual_screen_reserved">Reserved</string>
<string name="graph_view.filters_based_on_giulia_screen">Filters</string>
<string name="graph_view.filters_filter_1">Filter 1</string>
<string name="graph_view.filters_filter_2">Filter 2</string>
<string name="graph_view.filters_filter_3">Filter 3</string>
<string name="graph_view.filters_filter_4">Filter 4</string>
<string name="graph_view.filters_filter_5">Filter 5</string>
<string name="graph_view.filters_filter_6">Filter 6</string>
<string name="graph_view.filters_filter_7">Filter 7</string>


<string-array name="pref.numbers_1_20">
Expand Down
22 changes: 11 additions & 11 deletions app/src/main/res/xml/preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@
android:summary="@string/pref.view_category_summary"
android:title="@string/pref.settings">
<PreferenceScreen
android:summary="@string/pref.gauge_category"
android:summary="@string/pref.gauge.category"
android:title="@string/navigation.title_gauge"
app:key="pref.gauge">

Expand Down Expand Up @@ -909,7 +909,7 @@


<PreferenceScreen
android:summary="@string/pref.aa_category"
android:summary="@string/pref.aa.category"
android:title="@string/navigation.title_aa"
app:isPreferenceVisible="@bool/MODULE_ANDROID_AUTO_ENABLED"
app:key="pref.aa">
Expand Down Expand Up @@ -1418,7 +1418,7 @@
</PreferenceScreen>

<PreferenceScreen
android:summary="@string/pref.graph_category"
android:summary="@string/pref.graph.category"
android:title="@string/navigation.title_graph"
app:key="pref.graph">

Expand Down Expand Up @@ -1448,8 +1448,8 @@
<org.obd.graphs.preferences.trips.TripsListPreferences
android:defaultValue="@array/pref.empty_array"
android:key="pref.graph.trips.selected"
android:summary="@string/pref.graph_trips_selected_summary"
android:title="@string/pref.graph_trips_selected" />
android:summary="@string/pref.graph.trips_selected_summary"
android:title="@string/pref.graph.trips_selected" />
</PreferenceCategory>
</PreferenceScreen>
</PreferenceCategory>
Expand Down Expand Up @@ -1487,23 +1487,23 @@

<ListPreference
android:defaultValue="20"
android:dialogTitle="@string/pref.graph_x_axis_minimum_shift_time"
android:dialogTitle="@string/pref.graph.x_axis_minimum_shift_time"
android:entries="@array/pref.numbers_20_74"
android:entryValues="@array/pref.numbers_20_74"
android:inputType="number"
android:key="pref.graph.x-axis.minimum-shift.time"
android:title="@string/pref.graph_x_axis_minimum_shift_time"
android:title="@string/pref.graph.x_axis_minimum_shift_time"
app:singleLineTitle="false"
app:useSimpleSummaryProvider="true" />

<ListPreference
android:defaultValue="20000"
android:dialogTitle="@string/pref.graph_x_axis_start_moving_after_time"
android:dialogTitle="@string/pref.graph.x_axis_start_moving_after_time"
android:entries="@array/pref.numbers_20000_60000"
android:entryValues="@array/pref.numbers_20000_60000"
android:inputType="number"
android:key="pref.graph.x-axis.start-moving-after.time"
android:title="@string/pref.graph_x_axis_start_moving_after_time"
android:title="@string/pref.graph.x_axis_start_moving_after_time"
app:singleLineTitle="false"
app:useSimpleSummaryProvider="true" />

Expand All @@ -1513,12 +1513,12 @@
<CheckBoxPreference
android:defaultValue="false"
android:key="pref.trips.recordings.display_info"
android:title="@string/pref.trips_recordings_display_info" />
android:title="@string/pref.graph.trips_recordings_display_info" />

<CheckBoxPreference
android:defaultValue="false"
android:key="pref.trips.recordings.save.short.trip"
android:title="@string/pref.trips_recordings_save_short_trip"
android:title="@string/pref.graph.trips_recordings_save_short_trip"
app:singleLineTitle="false" />
</PreferenceCategory>
</PreferenceScreen>
Expand Down

0 comments on commit 76f0307

Please sign in to comment.