From 5e3c2f44b03f32ee7e0e941eafe495a4a049ebf7 Mon Sep 17 00:00:00 2001 From: Zhengyu Peng Date: Tue, 22 Feb 2022 22:05:36 -0500 Subject: [PATCH] update GUI --- .../rookiedev/hexapod/DeviceListActivity.kt | 5 +++++ .../main/res/layout/activity_device_list.xml | 22 ++++++++++++++++++- .../app/src/main/res/layout/activity_main.xml | 2 ++ .../app/src/main/res/values/colors.xml | 1 + 4 files changed, 29 insertions(+), 1 deletion(-) diff --git a/software/android/app/src/main/java/com/rookiedev/hexapod/DeviceListActivity.kt b/software/android/app/src/main/java/com/rookiedev/hexapod/DeviceListActivity.kt index ec1284c..5089d76 100644 --- a/software/android/app/src/main/java/com/rookiedev/hexapod/DeviceListActivity.kt +++ b/software/android/app/src/main/java/com/rookiedev/hexapod/DeviceListActivity.kt @@ -92,6 +92,11 @@ class DeviceListActivity : Activity() { val pairedListView: ListView = findViewById(R.id.paired_devices) pairedListView.adapter = bluetoothAdapter pairedListView.onItemClickListener = mDeviceClickListener + + val cancelPicker = findViewById(R.id.cancel_picker) + cancelPicker.setOnClickListener { + finish() + } } /** diff --git a/software/android/app/src/main/res/layout/activity_device_list.xml b/software/android/app/src/main/res/layout/activity_device_list.xml index a333570..eb35006 100644 --- a/software/android/app/src/main/res/layout/activity_device_list.xml +++ b/software/android/app/src/main/res/layout/activity_device_list.xml @@ -30,7 +30,7 @@ android:id="@+id/divider" android:layout_width="match_parent" android:layout_height="1dp" - android:background="?android:attr/listDivider" /> + android:background="@color/grey_200" /> + + + + \ No newline at end of file diff --git a/software/android/app/src/main/res/layout/activity_main.xml b/software/android/app/src/main/res/layout/activity_main.xml index 28e6363..3f98626 100644 --- a/software/android/app/src/main/res/layout/activity_main.xml +++ b/software/android/app/src/main/res/layout/activity_main.xml @@ -100,6 +100,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:digits="0123456789." + android:backgroundTint="@color/grey_100" android:hint="IP" android:inputType="number|numberDecimal" android:text="192.168.1.127" /> @@ -123,6 +124,7 @@ android:id="@+id/port_input" android:layout_width="match_parent" android:layout_height="wrap_content" + android:backgroundTint="@color/grey_100" android:hint="Port" android:inputType="number" android:text="1234" /> diff --git a/software/android/app/src/main/res/values/colors.xml b/software/android/app/src/main/res/values/colors.xml index c09eeab..ed92634 100644 --- a/software/android/app/src/main/res/values/colors.xml +++ b/software/android/app/src/main/res/values/colors.xml @@ -3,6 +3,7 @@ #FFBB86FC #FF6200EE #FF3700B3 + #FFF5F5F5 #FFEEEEEE #FF9E9E9E #FF616161