1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-29 13:26:50 +01:00

Remove reserved space for icons from charts and about user preferences

This commit is contained in:
José Rebelo 2023-07-25 12:29:52 +01:00
parent cac92fdc26
commit 58526ebf87
3 changed files with 56 additions and 17 deletions

View File

@ -1007,6 +1007,7 @@
<string name="FetchActivityOperation_about_to_transfer_since">About to transfer data since %1$s</string> <string name="FetchActivityOperation_about_to_transfer_since">About to transfer data since %1$s</string>
<string name="waiting_for_reconnect">Waiting for reconnect</string> <string name="waiting_for_reconnect">Waiting for reconnect</string>
<string name="activity_prefs_about_you">About you</string> <string name="activity_prefs_about_you">About you</string>
<string name="activity_prefs_goals">Goals</string>
<string name="activity_prefs_year_birth">Year of birth</string> <string name="activity_prefs_year_birth">Year of birth</string>
<string name="activity_prefs_gender">Gender</string> <string name="activity_prefs_gender">Gender</string>
<string name="activity_prefs_height_cm">Height in cm</string> <string name="activity_prefs_height_cm">Height in cm</string>

View File

@ -2,10 +2,12 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:app="http://schemas.android.com/apk/res-auto">
<PreferenceCategory <PreferenceCategory
app:iconSpaceReserved="false"
android:key="pref_category_activity_personal" android:key="pref_category_activity_personal"
android:title="@string/activity_prefs_about_you"> android:title="@string/activity_prefs_about_you">
<EditTextPreference <EditTextPreference
app:iconSpaceReserved="false"
android:inputType="number" android:inputType="number"
android:key="activity_user_year_of_birth" android:key="activity_user_year_of_birth"
android:maxLength="4" android:maxLength="4"
@ -13,6 +15,7 @@
app:useSimpleSummaryProvider="true" /> app:useSimpleSummaryProvider="true" />
<ListPreference <ListPreference
app:iconSpaceReserved="false"
android:defaultValue="2" android:defaultValue="2"
android:entries="@array/gender" android:entries="@array/gender"
android:entryValues="@array/gender_values" android:entryValues="@array/gender_values"
@ -22,6 +25,7 @@
<!--TODO: support localized heights and weights --> <!--TODO: support localized heights and weights -->
<EditTextPreference <EditTextPreference
app:iconSpaceReserved="false"
android:inputType="number" android:inputType="number"
android:key="activity_user_height_cm" android:key="activity_user_height_cm"
android:maxLength="3" android:maxLength="3"
@ -29,6 +33,7 @@
app:useSimpleSummaryProvider="true" /> app:useSimpleSummaryProvider="true" />
<EditTextPreference <EditTextPreference
app:iconSpaceReserved="false"
android:inputType="number" android:inputType="number"
android:key="activity_user_weight_kg" android:key="activity_user_weight_kg"
android:maxLength="3" android:maxLength="3"
@ -36,6 +41,22 @@
app:useSimpleSummaryProvider="true" /> app:useSimpleSummaryProvider="true" />
<EditTextPreference <EditTextPreference
app:iconSpaceReserved="false"
android:inputType="number"
android:key="activity_user_step_length_cm"
android:maxLength="3"
android:title="@string/activity_prefs_step_length_cm"
app:useSimpleSummaryProvider="true" />
</PreferenceCategory>
<PreferenceCategory
app:iconSpaceReserved="false"
android:key="pref_category_targets"
android:title="@string/activity_prefs_goals">
<EditTextPreference
app:iconSpaceReserved="false"
android:inputType="number" android:inputType="number"
android:key="activity_user_goal_weight_kg" android:key="activity_user_goal_weight_kg"
android:maxLength="3" android:maxLength="3"
@ -43,13 +64,7 @@
app:useSimpleSummaryProvider="true" /> app:useSimpleSummaryProvider="true" />
<EditTextPreference <EditTextPreference
android:inputType="number" app:iconSpaceReserved="false"
android:key="activity_user_step_length_cm"
android:maxLength="3"
android:title="@string/activity_prefs_step_length_cm"
app:useSimpleSummaryProvider="true" />
<EditTextPreference
android:defaultValue="10000" android:defaultValue="10000"
android:inputType="number" android:inputType="number"
android:key="fitness_goal" android:key="fitness_goal"
@ -58,6 +73,7 @@
app:useSimpleSummaryProvider="true" /> app:useSimpleSummaryProvider="true" />
<EditTextPreference <EditTextPreference
app:iconSpaceReserved="false"
android:inputType="number" android:inputType="number"
android:key="activity_user_sleep_duration" android:key="activity_user_sleep_duration"
android:maxLength="2" android:maxLength="2"
@ -65,6 +81,7 @@
app:useSimpleSummaryProvider="true" /> app:useSimpleSummaryProvider="true" />
<EditTextPreference <EditTextPreference
app:iconSpaceReserved="false"
android:defaultValue="2000" android:defaultValue="2000"
android:inputType="number" android:inputType="number"
android:key="activity_user_calories_burnt" android:key="activity_user_calories_burnt"
@ -73,6 +90,7 @@
app:useSimpleSummaryProvider="true" /> app:useSimpleSummaryProvider="true" />
<EditTextPreference <EditTextPreference
app:iconSpaceReserved="false"
android:defaultValue="5000" android:defaultValue="5000"
android:inputType="number" android:inputType="number"
android:key="activity_user_distance_meters" android:key="activity_user_distance_meters"
@ -81,6 +99,7 @@
app:useSimpleSummaryProvider="true" /> app:useSimpleSummaryProvider="true" />
<EditTextPreference <EditTextPreference
app:iconSpaceReserved="false"
android:defaultValue="60" android:defaultValue="60"
android:inputType="number" android:inputType="number"
android:key="activity_user_activetime_minutes" android:key="activity_user_activetime_minutes"
@ -89,6 +108,7 @@
app:useSimpleSummaryProvider="true" /> app:useSimpleSummaryProvider="true" />
<EditTextPreference <EditTextPreference
app:iconSpaceReserved="false"
android:defaultValue="12" android:defaultValue="12"
android:inputType="number" android:inputType="number"
android:key="activity_user_goal_standing_time_minutes" android:key="activity_user_goal_standing_time_minutes"
@ -97,6 +117,7 @@
app:useSimpleSummaryProvider="true" /> app:useSimpleSummaryProvider="true" />
<EditTextPreference <EditTextPreference
app:iconSpaceReserved="false"
android:defaultValue="30" android:defaultValue="30"
android:inputType="number" android:inputType="number"
android:key="activity_user_goal_fat_burn_time_minutes" android:key="activity_user_goal_fat_burn_time_minutes"

View File

@ -3,7 +3,8 @@
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:app="http://schemas.android.com/apk/res-auto">
<PreferenceCategory <PreferenceCategory
android:key="pref_charts" android:key="pref_charts"
android:title="@string/activity_prefs_charts"> android:title="@string/activity_prefs_charts"
app:iconSpaceReserved="false">
<EditTextPreference <EditTextPreference
android:defaultValue="250" android:defaultValue="250"
@ -11,6 +12,7 @@
android:key="chart_max_heart_rate" android:key="chart_max_heart_rate"
android:maxLength="3" android:maxLength="3"
android:title="@string/activity_prefs_chart_max_heart_rate" android:title="@string/activity_prefs_chart_max_heart_rate"
app:iconSpaceReserved="false"
app:useSimpleSummaryProvider="true" /> app:useSimpleSummaryProvider="true" />
<EditTextPreference <EditTextPreference
@ -19,6 +21,7 @@
android:key="chart_min_heart_rate" android:key="chart_min_heart_rate"
android:maxLength="3" android:maxLength="3"
android:title="@string/activity_prefs_chart_min_heart_rate" android:title="@string/activity_prefs_chart_min_heart_rate"
app:iconSpaceReserved="false"
app:useSimpleSummaryProvider="true" /> app:useSimpleSummaryProvider="true" />
<SwitchPreference <SwitchPreference
@ -26,36 +29,42 @@
android:key="chart_heartrate_color" android:key="chart_heartrate_color"
android:summaryOff="@string/pref_chart_heartrate_color_orange" android:summaryOff="@string/pref_chart_heartrate_color_orange"
android:summaryOn="@string/pref_chart_heartrate_color_red" android:summaryOn="@string/pref_chart_heartrate_color_red"
android:title="@string/pref_title_chart_heartrate_color" /> android:title="@string/pref_title_chart_heartrate_color"
app:iconSpaceReserved="false" />
<SwitchPreference <SwitchPreference
android:defaultValue="true" android:defaultValue="true"
android:key="charts_allow_swipe" android:key="charts_allow_swipe"
android:title="@string/pref_title_charts_swipe" /> android:title="@string/pref_title_charts_swipe"
app:iconSpaceReserved="false" />
<SwitchPreference <SwitchPreference
android:defaultValue="false" android:defaultValue="false"
android:key="chart_sleep_range_24h" android:key="chart_sleep_range_24h"
android:summaryOff="@string/pref_chart_sleep_rolling_24_off" android:summaryOff="@string/pref_chart_sleep_rolling_24_off"
android:summaryOn="@string/pref_chart_sleep_rolling_24_on" android:summaryOn="@string/pref_chart_sleep_rolling_24_on"
android:title="@string/pref_title_chart_sleep_rolling_24_hour" /> android:title="@string/pref_title_chart_sleep_rolling_24_hour"
app:iconSpaceReserved="false" />
<SwitchPreference <SwitchPreference
android:defaultValue="true" android:defaultValue="true"
android:key="charts_show_average" android:key="charts_show_average"
android:title="@string/pref_title_charts_average" /> android:title="@string/pref_title_charts_average"
app:iconSpaceReserved="false" />
<SwitchPreference <SwitchPreference
android:defaultValue="false" android:defaultValue="false"
android:key="charts_range" android:key="charts_range"
android:summaryOff="@string/pref_charts_range_off" android:summaryOff="@string/pref_charts_range_off"
android:summaryOn="@string/pref_charts_range_on" android:summaryOn="@string/pref_charts_range_on"
android:title="@string/pref_title_charts_range" /> android:title="@string/pref_title_charts_range"
app:iconSpaceReserved="false" />
<SwitchPreference <SwitchPreference
android:defaultValue="true" android:defaultValue="true"
android:key="charts_show_ongoing_activity" android:key="charts_show_ongoing_activity"
android:title="@string/show_ongoing_activity" /> android:title="@string/show_ongoing_activity"
app:iconSpaceReserved="false" />
<EditTextPreference <EditTextPreference
android:defaultValue="6" android:defaultValue="6"
@ -63,13 +72,15 @@
android:key="chart_sleep_lines_limit" android:key="chart_sleep_lines_limit"
android:maxLength="2" android:maxLength="2"
android:title="@string/pref_chart_sleep_lines_limit" android:title="@string/pref_chart_sleep_lines_limit"
app:iconSpaceReserved="false"
app:useSimpleSummaryProvider="true" /> app:useSimpleSummaryProvider="true" />
</PreferenceCategory> </PreferenceCategory>
<PreferenceCategory <PreferenceCategory
android:key="pref_charts_activity_list" android:key="pref_charts_activity_list"
android:title="@string/charts_activity_list"> android:title="@string/charts_activity_list"
app:iconSpaceReserved="false">
<EditTextPreference <EditTextPreference
android:defaultValue="5" android:defaultValue="5"
@ -77,6 +88,7 @@
android:key="chart_list_min_session_length" android:key="chart_list_min_session_length"
android:maxLength="2" android:maxLength="2"
android:title="@string/activity_prefs_chart_min_session_length" android:title="@string/activity_prefs_chart_min_session_length"
app:iconSpaceReserved="false"
app:useSimpleSummaryProvider="true" /> app:useSimpleSummaryProvider="true" />
<EditTextPreference <EditTextPreference
@ -85,6 +97,7 @@
android:key="chart_list_max_idle_phase_length" android:key="chart_list_max_idle_phase_length"
android:maxLength="2" android:maxLength="2"
android:title="@string/activity_prefs_chart_max_idle_phase_length" android:title="@string/activity_prefs_chart_max_idle_phase_length"
app:iconSpaceReserved="false"
app:useSimpleSummaryProvider="true" /> app:useSimpleSummaryProvider="true" />
<EditTextPreference <EditTextPreference
@ -93,6 +106,7 @@
android:key="chart_list_min_steps_per_minute" android:key="chart_list_min_steps_per_minute"
android:maxLength="3" android:maxLength="3"
android:title="@string/activity_prefs_chart_min_steps_per_minute" android:title="@string/activity_prefs_chart_min_steps_per_minute"
app:iconSpaceReserved="false"
app:useSimpleSummaryProvider="true" /> app:useSimpleSummaryProvider="true" />
<EditTextPreference <EditTextPreference
@ -101,15 +115,18 @@
android:key="chart_list_min_steps_per_minute_for_run" android:key="chart_list_min_steps_per_minute_for_run"
android:maxLength="3" android:maxLength="3"
android:title="@string/activity_prefs_chart_min_steps_per_minute_for_run" android:title="@string/activity_prefs_chart_min_steps_per_minute_for_run"
app:iconSpaceReserved="false"
app:useSimpleSummaryProvider="true" /> app:useSimpleSummaryProvider="true" />
</PreferenceCategory> </PreferenceCategory>
<PreferenceCategory <PreferenceCategory
android:key="pref_category_activity_personal_title" android:key="pref_category_activity_personal_title"
android:title="@string/activity_prefs_about_you"> android:title="@string/activity_prefs_about_you"
app:iconSpaceReserved="false">
<Preference <Preference
android:key="pref_category_activity_personal" android:key="pref_category_activity_personal"
android:title="@string/activity_prefs_about_you" /> android:title="@string/activity_prefs_about_you"
app:iconSpaceReserved="false" />
</PreferenceCategory> </PreferenceCategory>
</PreferenceScreen> </PreferenceScreen>