]> git.gag.com Git - fw/altos/commitdiff
altosdroid: Create a minimal (and largely fake) preferences dialog
authorKeith Packard <keithp@keithp.com>
Thu, 12 Dec 2013 05:50:01 +0000 (21:50 -0800)
committerKeith Packard <keithp@keithp.com>
Thu, 12 Dec 2013 05:50:01 +0000 (21:50 -0800)
This should explain where this will happen for real in the future.

Signed-off-by: Keith Packard <keithp@keithp.com>
altosdroid/AndroidManifest.xml
altosdroid/res/menu/option_menu.xml
altosdroid/res/values/strings.xml
altosdroid/src/org/altusmetrum/AltosDroid/AltosDroid.java

index 04a679e1574823cb1e8b02eab7f604af282f8969..9ee6b0e2c0ff88583c0b3a17ae966d7d33f2df8a 100644 (file)
                   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"
index d7ba8305766c3106bb6cc656a65885ce2200d77a..ea294a8f1a5af27c09b9e358606eb2500a468a63 100644 (file)
@@ -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>
index 90da617b2ffe9af6e29e49e5f476ebe600415a79..d0533e52841a8fbf5ce09e3a670108ba2034deab 100644 (file)
@@ -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>
        <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>
index 92287476b7dbf56fc654c408e5ddeb8c5ba41fd4..510ed85be08553cc5d310014a8b89f06cda6e6ae 100644 (file)
@@ -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;
        }