From 6f3ca8b9c4134ed887fd908041ec7b252aeb545c Mon Sep 17 00:00:00 2001 From: Peter Serwylo Date: Sun, 12 Apr 2015 00:14:28 +1000 Subject: [PATCH] WIP: Making 'scan' UI more solid --- F-Droid/res/layout/swap_bluetooth_header.xml | 44 ++++---- F-Droid/res/menu/swap_scan.xml | 14 +++ F-Droid/res/values/strings.xml | 2 + F-Droid/res/values/styles.xml | 4 +- .../swap/BluetoothDeviceListFragment.java | 101 +++++++++++++++--- 5 files changed, 130 insertions(+), 35 deletions(-) create mode 100644 F-Droid/res/menu/swap_scan.xml diff --git a/F-Droid/res/layout/swap_bluetooth_header.xml b/F-Droid/res/layout/swap_bluetooth_header.xml index 3977d3c86..89992d1ae 100644 --- a/F-Droid/res/layout/swap_bluetooth_header.xml +++ b/F-Droid/res/layout/swap_bluetooth_header.xml @@ -12,42 +12,50 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/device_name_prefix" - android:text="Your device is" - tools:text="Your device is" - android:textAlignment="center" - style="@style/SwapTheme.BluetoothDeviceList.Heading" android:paddingTop="10dp" - android:paddingBottom="10dp" android:textSize="24sp"/> + android:text="@string/swap_bluetooth_your_device" + android:gravity="center_horizontal" + style="@style/SwapTheme.BluetoothDeviceList.Heading" + android:paddingTop="10dp" + android:paddingBottom="10dp" + android:textSize="24sp"/> + tools:text="Phone v2.0" + android:gravity="center_horizontal" + style="@style/SwapTheme.BluetoothDeviceList.Heading" + android:paddingBottom="10dp"/> + android:gravity="center_horizontal" + style="@style/SwapTheme.BluetoothDeviceList.Heading" + android:paddingBottom="20dp" + android:textSize="24sp"/> + android:id="@+id/loading_indicator" + android:paddingLeft="5dp" + android:paddingRight="5dp" + android:visibility="gone" + android:indeterminate="true" + style="?android:attr/android:progressBarStyleHorizontal"/> \ No newline at end of file diff --git a/F-Droid/res/menu/swap_scan.xml b/F-Droid/res/menu/swap_scan.xml new file mode 100644 index 000000000..ae932ccd2 --- /dev/null +++ b/F-Droid/res/menu/swap_scan.xml @@ -0,0 +1,14 @@ + + + + + + + \ No newline at end of file diff --git a/F-Droid/res/values/strings.xml b/F-Droid/res/values/strings.xml index 5da5d0d1f..fb94347b9 100644 --- a/F-Droid/res/values/strings.xml +++ b/F-Droid/res/values/strings.xml @@ -329,4 +329,6 @@ May work Promising Best bet + Your device is + Select from devices below, or press \"Scan\" from the menu to find more devices. diff --git a/F-Droid/res/values/styles.xml b/F-Droid/res/values/styles.xml index 0a2dcc8b2..37496f601 100644 --- a/F-Droid/res/values/styles.xml +++ b/F-Droid/res/values/styles.xml @@ -46,10 +46,10 @@ - -