summaryrefslogtreecommitdiff
path: root/altosdroid/res
diff options
context:
space:
mode:
authorMike Beattie <mike@ethernal.org>2012-08-02 22:09:24 +1200
committerMike Beattie <mike@ethernal.org>2012-08-02 22:09:24 +1200
commit359d7353fd7b7d4d537db04c5e89724502333ff8 (patch)
tree0535ae90a79cbed6ba32700dafefe20197179358 /altosdroid/res
parentc5304ac976dd44344a0b70ae3622e1f2d112a147 (diff)
AltosDroid: Begin re-working Bluetooth code
* Move to using explicit 'magic' UUID, rather than java reflection * Re-work UI to make it more useful for testing * Use Insecure RFCOMM only, and remove code that differentiates. Signed-off-by: Mike Beattie <mike@ethernal.org>
Diffstat (limited to 'altosdroid/res')
-rw-r--r--altosdroid/res/layout/main.xml24
-rw-r--r--altosdroid/res/menu/option_menu.xml12
-rw-r--r--altosdroid/res/values/strings.xml14
3 files changed, 23 insertions, 27 deletions
diff --git a/altosdroid/res/layout/main.xml b/altosdroid/res/layout/main.xml
index 17025f6b..f2e6640c 100644
--- a/altosdroid/res/layout/main.xml
+++ b/altosdroid/res/layout/main.xml
@@ -19,24 +19,30 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
>
- <ListView android:id="@+id/in"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:stackFromBottom="true"
- android:transcriptMode="alwaysScroll"
+
+ <TextView
+ android:id="@+id/in"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
android:layout_weight="1"
- />
+ android:gravity="bottom"
+ android:scrollbars="vertical"
+ android:typeface="monospace" />
+
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
- <EditText android:id="@+id/edit_text_out"
+
+ <EditText
+ android:id="@+id/edit_text_out"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_weight="1"
android:layout_gravity="bottom"
- />
+ android:layout_weight="1"
+ android:inputType="text|textNoSuggestions" />
+
<Button android:id="@+id/button_send"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
diff --git a/altosdroid/res/menu/option_menu.xml b/altosdroid/res/menu/option_menu.xml
index 27625e9c..feb5668e 100644
--- a/altosdroid/res/menu/option_menu.xml
+++ b/altosdroid/res/menu/option_menu.xml
@@ -14,19 +14,13 @@
limitations under the License.
-->
<menu xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:id="@+id/connect_scan"
+ android:icon="@android:drawable/ic_menu_search"
+ android:title="@string/connect_device" />
<item android:id="@+id/telemetry_service_control"
android:icon="@android:drawable/ic_menu_manage"
android:title="@string/telemetry_service_control" />
<item android:id="@+id/telemetry_service_bind"
android:icon="@android:drawable/ic_menu_rotate"
android:title="@string/telemetry_service_bind" />
- <item android:id="@+id/secure_connect_scan"
- android:icon="@android:drawable/ic_menu_search"
- android:title="@string/secure_connect" />
- <item android:id="@+id/insecure_connect_scan"
- android:icon="@android:drawable/ic_menu_search"
- android:title="@string/insecure_connect" />
- <item android:id="@+id/discoverable"
- android:icon="@android:drawable/ic_menu_mylocation"
- android:title="@string/discoverable" />
</menu>
diff --git a/altosdroid/res/values/strings.xml b/altosdroid/res/values/strings.xml
index 0b2f9227..249550fb 100644
--- a/altosdroid/res/values/strings.xml
+++ b/altosdroid/res/values/strings.xml
@@ -21,12 +21,12 @@
<string name="send">Send</string>
<string name="not_connected">You are not connected to a device</string>
<string name="bt_not_enabled_leaving">Bluetooth was not enabled. Leaving Bluetooth Chat.</string>
- <string name="title_connecting">connecting...</string>
+ <string name="title_connecting">connecting…</string>
<string name="title_connected_to">connected: </string>
<string name="title_not_connected">not connected</string>
<!-- DeviceListActivity -->
- <string name="scanning">scanning for devices...</string>
+ <string name="scanning">scanning for devices…</string>
<string name="select_device">select a device to connect</string>
<string name="none_paired">No devices have been paired</string>
<string name="none_found">No devices found</string>
@@ -35,9 +35,9 @@
<string name="button_scan">Scan for devices</string>
<!-- Options Menu -->
- <string name="secure_connect">Connect a device - Secure</string>
- <string name="insecure_connect">Connect a device - Insecure</string>
- <string name="discoverable">Make discoverable</string>
+ <string name="connect_device">Connect a device</string>
+ <string name="telemetry_service_control">Control Service</string>
+ <string name="telemetry_service_bind">(Un)Bind Service</string>
<!-- Service -->
<string name="telemetry_service_label">AltOS Telemetry Service</string>
@@ -45,10 +45,6 @@
<string name="telemetry_service_stopped">Telemetry Service Stopped</string>
-
- <string name="telemetry_service_control">Start/Stop Service</string>
- <string name="telemetry_service_bind">Bind/Unbind Service</string>
-
<string name="activity_telemetry_service_controller">App/Service/Local Service Controller</string>
<string name="telemetry_service_controller">This demonstrates how you can implement persistent services that
may be started and stopped as desired.</string>