Making the Device Details activity pretty
This commit is contained in:
@@ -7,16 +7,9 @@
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin" >
|
||||
|
||||
<ScrollView
|
||||
<ListView
|
||||
android:id="@android:id/list"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvDetails"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="12sp"
|
||||
android:typeface="monospace" />
|
||||
</ScrollView>
|
||||
|
||||
</ListView>
|
||||
</RelativeLayout>
|
||||
@@ -0,0 +1,43 @@
|
||||
<?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="wrap_content"
|
||||
android:gravity="top"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="5dp" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<GridLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:columnCount="2"
|
||||
android:useDefaultMargins="true" >
|
||||
|
||||
<TextView
|
||||
style="@style/GridLayoutTitleTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="As String:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/data_as_string"
|
||||
style="@style/GridLayoutDataTextViewMonospace" />
|
||||
|
||||
<TextView
|
||||
style="@style/GridLayoutTitleTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="As Array:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/data_as_array"
|
||||
style="@style/GridLayoutDataTextViewMonospace" />
|
||||
</GridLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,56 @@
|
||||
<?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="wrap_content"
|
||||
android:gravity="top"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="5dp" >
|
||||
|
||||
<GridLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:columnCount="2"
|
||||
android:useDefaultMargins="true" >
|
||||
|
||||
<TextView
|
||||
style="@style/GridLayoutTitleTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Device Name:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/deviceName"
|
||||
style="@style/GridLayoutDataTextView" />
|
||||
|
||||
<TextView
|
||||
style="@style/GridLayoutTitleTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Device Address" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/deviceAddress"
|
||||
style="@style/GridLayoutDataTextView" />
|
||||
|
||||
<TextView
|
||||
style="@style/GridLayoutTitleTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Device Class:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/deviceClass"
|
||||
style="@style/GridLayoutDataTextView" />
|
||||
|
||||
<TextView
|
||||
style="@style/GridLayoutTitleTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Bonding State" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/deviceBondingState"
|
||||
style="@style/GridLayoutDataTextView" />
|
||||
</GridLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?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="wrap_content"
|
||||
android:gravity="top"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="5dp" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@android:color/holo_blue_dark"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@android:color/holo_blue_dark" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,76 @@
|
||||
<?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="wrap_content"
|
||||
android:gravity="top"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="5dp" >
|
||||
|
||||
<GridLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:columnCount="2"
|
||||
android:useDefaultMargins="true" >
|
||||
|
||||
<TextView
|
||||
style="@style/GridLayoutTitleTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Company ID:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/companyId"
|
||||
style="@style/GridLayoutDataTextView" />
|
||||
|
||||
<TextView
|
||||
style="@style/GridLayoutTitleTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Advertisement:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/advertisement"
|
||||
style="@style/GridLayoutDataTextView" />
|
||||
|
||||
<TextView
|
||||
style="@style/GridLayoutTitleTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="UUID:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/uuid"
|
||||
style="@style/GridLayoutDataTextView" />
|
||||
|
||||
<TextView
|
||||
style="@style/GridLayoutTitleTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Major:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/major"
|
||||
style="@style/GridLayoutDataTextView" />
|
||||
|
||||
<TextView
|
||||
style="@style/GridLayoutTitleTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Minor:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/minor"
|
||||
style="@style/GridLayoutDataTextView" />
|
||||
|
||||
<TextView
|
||||
style="@style/GridLayoutTitleTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="TX Power:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txpower"
|
||||
style="@style/GridLayoutDataTextView" />
|
||||
</GridLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -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="wrap_content"
|
||||
android:gravity="top"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="5dp" >
|
||||
|
||||
<GridLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:columnCount="2"
|
||||
android:useDefaultMargins="true" >
|
||||
|
||||
<TextView
|
||||
style="@style/GridLayoutTitleTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="First Timestamp:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/firstTimestamp"
|
||||
style="@style/GridLayoutDataTextView" />
|
||||
|
||||
<TextView
|
||||
style="@style/GridLayoutTitleTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="First RSSI:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/firstRssi"
|
||||
style="@style/GridLayoutDataTextView" />
|
||||
|
||||
<TextView
|
||||
style="@style/GridLayoutTitleTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Last Timestamp:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lastTimestamp"
|
||||
style="@style/GridLayoutDataTextView" />
|
||||
|
||||
<TextView
|
||||
style="@style/GridLayoutTitleTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Last RSSI:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lastRssi"
|
||||
style="@style/GridLayoutDataTextView" />
|
||||
|
||||
<TextView
|
||||
style="@style/GridLayoutTitleTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Running Average RSSI:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/runningAverageRssi"
|
||||
style="@style/GridLayoutDataTextView" />
|
||||
</GridLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?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="wrap_content"
|
||||
android:gravity="top"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="5dp" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/data"
|
||||
style="@style/GridLayoutDataTextViewMonospace" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -44,5 +44,12 @@
|
||||
<string name="exporter_email_subject">Bluetooth LE Scan Results (%s)</string>
|
||||
<string name="exporter_email_body">Please find attached the scan results.</string>
|
||||
<string name="exporter_email_picker_text">Please select your email client:</string>
|
||||
<string name="header_ibeacon_data">iBeacon Data</string>
|
||||
<string name="header_raw_ad_records">Raw Ad Records</string>
|
||||
<string name="header_scan_record">Scan Record</string>
|
||||
<string name="header_rssi_info">RSSI Info</string>
|
||||
<string name="header_device_info">Device Info</string>
|
||||
<string name="invalid_device_data">Invalid Device Data!</string>
|
||||
<string name="unknown">unknown</string>
|
||||
|
||||
</resources>
|
||||
@@ -1,4 +1,4 @@
|
||||
<resources>
|
||||
<resources xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<!--
|
||||
Base application theme, dependent on API level. This theme is replaced
|
||||
@@ -17,4 +17,24 @@
|
||||
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
<style name="GridLayoutDataTextView" parent="android:Widget.Holo.Light.TextView">
|
||||
<item name="android:textSize">12sp</item>
|
||||
<item name="android:layout_weight">1</item>
|
||||
<item name="android:ellipsize">none</item>
|
||||
<item name="android:singleLine">false</item>
|
||||
<item name="android:scrollHorizontally">false</item>
|
||||
<item name="android:maxLines">100</item>
|
||||
<item name="android:inputType">textMultiLine</item>
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:layout_height">match_parent</item>
|
||||
</style>
|
||||
|
||||
<style name="GridLayoutDataTextViewMonospace" parent="@style/GridLayoutDataTextView">
|
||||
<item name="android:typeface">monospace</item>
|
||||
</style>
|
||||
|
||||
<style name="GridLayoutTitleTextView" parent="android:Widget.Holo.Light.TextView">
|
||||
<item name="android:textSize">12sp</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
Reference in New Issue
Block a user