summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-12-11 21:50:01 -0800
committerKeith Packard <keithp@keithp.com>2013-12-11 21:50:01 -0800
commit5e89fe4dc43110db65949b704383eac37cb5652a (patch)
tree73d64d409c95a61921ee53821ee00138cd1f20b6
parent6545a72012e94a50d185e1c4ecff3c3769d60acd (diff)
altosdroid: Create a minimal (and largely fake) preferences dialog
This should explain where this will happen for real in the future. Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--altosdroid/AndroidManifest.xml4
-rw-r--r--altosdroid/res/menu/option_menu.xml3
-rw-r--r--altosdroid/res/values/strings.xml15
-rw-r--r--altosdroid/src/org/altusmetrum/AltosDroid/AltosDroid.java3
4 files changed, 25 insertions, 0 deletions
diff --git a/altosdroid/AndroidManifest.xml b/altosdroid/AndroidManifest.xml
index 04a679e1..9ee6b0e2 100644
--- a/altosdroid/AndroidManifest.xml
+++ b/altosdroid/AndroidManifest.xml
@@ -54,6 +54,10 @@
android:theme="@android:style/Theme.Dialog"
android:configChanges="orientation|keyboardHidden" />
+ <activity android:name=".AltosPreferencesUI"
+ android:label="@string/preferences"
+ android:theme="@android:style/Theme.Dialog" />
+
<service android:name=".TelemetryService" />
<meta-data android:name="com.google.android.maps.v2.API_KEY"
diff --git a/altosdroid/res/menu/option_menu.xml b/altosdroid/res/menu/option_menu.xml
index d7ba8305..ea294a8f 100644
--- a/altosdroid/res/menu/option_menu.xml
+++ b/altosdroid/res/menu/option_menu.xml
@@ -20,4 +20,7 @@
<item android:id="@+id/select_freq"
android:icon="@android:drawable/ic_menu_preferences"
android:title="@string/select_freq" />
+ <item android:id="@+id/preferences"
+ android:icon="@android:drawable/ic_menu_preferences"
+ android:title="@string/preferences" />
</menu>
diff --git a/altosdroid/res/values/strings.xml b/altosdroid/res/values/strings.xml
index 90da617b..d0533e52 100644
--- a/altosdroid/res/values/strings.xml
+++ b/altosdroid/res/values/strings.xml
@@ -28,6 +28,7 @@
<!-- Options Menu -->
<string name="connect_device">Connect a device</string>
<string name="select_freq">Select radio frequency</string>
+ <string name="preferences">Preferences</string>
<!-- DeviceListActivity -->
<string name="scanning">scanning for devices…</string>
@@ -80,4 +81,18 @@
<string name="pad_lon_label">Pad Lon</string>
<string name="pad_alt_label">Pad Alt</string>
+ <!-- Preferences -->
+ <string name="pref_units_title">Imperial Units</string>
+ <string name="pref_units">IMPERIAL-UNITS</string>
+ <string name="pref_units_summary">
+ Use imperial units instead of metric
+ </string>
+ <string name="pref_sms_storage_title">Storage</string>
+ <string name="pref_sync">Sync</string>
+ <string name="pref_sync_summ">Sync Summary</string>
+ <string name="pref_syncConnectionType">Connection Type</string>
+ <string name="pref_syncConnectionTypes_default">
+ Default Connection Type
+ </string>
+
</resources>
diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroid.java b/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroid.java
index 92287476..510ed85b 100644
--- a/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroid.java
+++ b/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroid.java
@@ -512,6 +512,9 @@ public class AltosDroid extends FragmentActivity {
AlertDialog alert = builder.create();
alert.show();
return true;
+ case R.id.preferences:
+ startActivity(new Intent(this, AltosPreferencesUI.class));
+ return true;
}
return false;
}