-
Notifications
You must be signed in to change notification settings - Fork 103
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
Metric & Imperial #398
base: master
Are you sure you want to change the base?
Metric & Imperial #398
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -153,6 +153,9 @@ | |
<string name="p_ssid">SSID</string> | ||
<string name="p_ssid_summary">Station type (1..15; 9=Mobile, 10=APRS-IS)</string> | ||
<string name="p_ssid_entry">Enter the SSID for your station</string> | ||
<string name="p_units_title">Distance Units</string> | ||
<string name="p_units">Unit Preference</string> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This preference should go into the "Display and Notifications" section. It can be the first item in the category. Then it should be named "Distance Units" and the sub-string should be removed, as it will be replaced by the selected value anyway. |
||
<string name="p_units_entry">Select Distance Unit</string> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've stopped adding distinct entry dialog titles, as every string needs to be translated into all languages, and the preference title ("Distance Units") can be re-used here. |
||
<!-- array of station types (SSID) --> | ||
<string-array name="p_ssid_e"> | ||
<item>(none) Primary Station</item> | ||
|
@@ -172,6 +175,10 @@ | |
<item>14: Freight vehicle</item> | ||
<item>15: Generic additional station</item> | ||
</string-array> | ||
<string-array name="p_units_e"> | ||
<item>Metric</item> | ||
<item>Imperial</item> | ||
</string-array> | ||
<string name="p_symbol">APRS symbol</string> | ||
<string name="p_symbol_summary">Your symbol for map display</string> | ||
<string name="p_symbol_overlay">Overlay:</string> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,6 +50,18 @@ | |
</PreferenceScreen> | ||
</PreferenceCategory> | ||
|
||
<PreferenceCategory | ||
android:title="@string/p_units_title"> | ||
|
||
<de.duenndns.ListPreferenceWithValue | ||
android:key="p.units" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The key should be |
||
android:title="@string/p_units" | ||
android:entries="@array/p_units_e" | ||
android:entryValues="@array/p_units_ev" | ||
android:defaultValue="1" | ||
android:dialogTitle="@string/p_units_entry" /> | ||
|
||
</PreferenceCategory> | ||
<PreferenceCategory | ||
android:title="@string/p__position"> | ||
<PreferenceScreen | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The values "1" and "2" aren't useful. You can replace them with "metric" and "imperial" or completely remove the array and use
getListItemIndex()
to determine the configured value.