Improvements to BLE Scan activity to show more information on what is happening

This commit is contained in:
Graham Jones
2021-11-07 19:54:39 +00:00
parent eb2aff577f
commit 354b692222
6 changed files with 115 additions and 4 deletions

View File

@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingLeft="8dp"
android:paddingRight="8dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/ble_scan_status_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16pt"
android:text="ble_scan_status_tv" />
<Button
android:id="@+id/startScanButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="onScanButtonClick"
android:text="Start Scan"/>
</LinearLayout>
<TextView
android:id="@+id/ble_present_tv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="ble_present_tv" />
<TextView
android:id="@+id/ble_adapter_tv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="ble_adapter_tv" />
<TextView
android:id="@+id/current_ble_device_tv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="current_ble_device_tv" />
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<ListView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="#00FF00"
android:drawSelectorOnTop="false" />
<TextView
android:id="@android:id/empty"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FF0000"
android:text="No data" />
</LinearLayout>
</LinearLayout>