diff options
| author | Keith Packard <keithp@keithp.com> | 2014-08-31 00:08:33 -0500 |
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2014-08-31 00:08:33 -0500 |
| commit | bc3fbcb35090be3856284ccf4d908ebf39d02bec (patch) | |
| tree | 7cb5bada48a2bfc1b79cfda3b50d72c5c797fd9e /altosdroid/res | |
| parent | 0b70ea04e807c69a987d5976ab217f9f65fb1e09 (diff) | |
altosdroid: Add quit. Restart. Show freq in title.
Add a quit button to menu.
When restarting, reconnect to previous device.
When connecting, set the freq/rate to previous values.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosdroid/res')
| -rw-r--r-- | altosdroid/res/layout/device_list.xml | 30 | ||||
| -rw-r--r-- | altosdroid/res/menu/option_menu.xml | 3 | ||||
| -rw-r--r-- | altosdroid/res/values/strings.xml | 1 |
3 files changed, 19 insertions, 15 deletions
diff --git a/altosdroid/res/layout/device_list.xml b/altosdroid/res/layout/device_list.xml index 395695f8..93d65517 100644 --- a/altosdroid/res/layout/device_list.xml +++ b/altosdroid/res/layout/device_list.xml @@ -18,39 +18,39 @@ android:layout_width="match_parent" android:layout_height="match_parent" > - <TextView android:id="@+id/title_paired_devices" + <Button android:id="@+id/button_scan" android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="@string/title_paired_devices" + android:text="@string/button_scan" + /> + <TextView android:id="@+id/title_new_devices" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/title_other_devices" android:visibility="gone" android:background="#666" android:textColor="#fff" android:paddingLeft="5dp" /> - <ListView android:id="@+id/paired_devices" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:stackFromBottom="true" - android:layout_weight="1" - /> - <TextView android:id="@+id/title_new_devices" + <TextView android:id="@+id/title_paired_devices" android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="@string/title_other_devices" + android:text="@string/title_paired_devices" android:visibility="gone" android:background="#666" android:textColor="#fff" android:paddingLeft="5dp" /> - <ListView android:id="@+id/new_devices" + <ListView android:id="@+id/paired_devices" android:layout_width="match_parent" android:layout_height="wrap_content" android:stackFromBottom="true" - android:layout_weight="2" + android:layout_weight="1" /> - <Button android:id="@+id/button_scan" + <ListView android:id="@+id/new_devices" android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="@string/button_scan" + android:stackFromBottom="true" + android:layout_weight="2" /> -</LinearLayout>
\ No newline at end of file +</LinearLayout> diff --git a/altosdroid/res/menu/option_menu.xml b/altosdroid/res/menu/option_menu.xml index ee9d475f..4321d6e7 100644 --- a/altosdroid/res/menu/option_menu.xml +++ b/altosdroid/res/menu/option_menu.xml @@ -17,6 +17,9 @@ <item android:id="@+id/connect_scan" android:icon="@android:drawable/ic_menu_search" android:title="@string/connect_device" /> + <item android:id="@+id/quit" + android:icon="@android:drawable/ic_menu_close_clear_cancel" + android:title="@string/quit" /> <item android:id="@+id/select_freq" android:icon="@android:drawable/ic_menu_preferences" android:title="@string/select_freq" /> diff --git a/altosdroid/res/values/strings.xml b/altosdroid/res/values/strings.xml index ce335b76..0384b9b8 100644 --- a/altosdroid/res/values/strings.xml +++ b/altosdroid/res/values/strings.xml @@ -27,6 +27,7 @@ <!-- Options Menu --> <string name="connect_device">Connect a device</string> + <string name="quit">Quit</string> <string name="select_freq">Select radio frequency</string> <string name="select_rate">Select data rate</string> |
