Started rewriting the Gatt Screen UI
This commit is contained in:
@@ -14,86 +14,112 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:orientation="vertical" >
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin" >
|
||||
|
||||
<LinearLayout
|
||||
<GridLayout
|
||||
android:id="@+id/deviceInformation"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:orientation="horizontal" >
|
||||
android:layout_alignParentTop="true"
|
||||
android:columnCount="2"
|
||||
android:useDefaultMargins="true" >
|
||||
|
||||
<TextView
|
||||
style="@style/GridLayoutTitleTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_device_address"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<Space
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="wrap_content" />
|
||||
android:text="@string/label_device_address" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/device_address"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="18sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:orientation="horizontal" >
|
||||
style="@style/GridLayoutDataTextView" />
|
||||
|
||||
<TextView
|
||||
style="@style/GridLayoutTitleTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_state"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<Space
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="wrap_content" />
|
||||
android:text="@string/label_state" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/connection_state"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/disconnected"
|
||||
android:textSize="18sp" />
|
||||
</LinearLayout>
|
||||
style="@style/GridLayoutDataTextView" />
|
||||
</GridLayout>
|
||||
|
||||
<LinearLayout
|
||||
<View
|
||||
android:id="@+id/upperSepparator"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_below="@id/deviceInformation"
|
||||
android:background="@android:color/holo_blue_dark" />
|
||||
|
||||
<GridLayout
|
||||
android:id="@+id/gattInformation"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:orientation="horizontal" >
|
||||
android:layout_alignParentBottom="true"
|
||||
android:columnCount="2"
|
||||
android:useDefaultMargins="true" >
|
||||
|
||||
<TextView
|
||||
style="@style/GridLayoutTitleTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_data"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<Space
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="wrap_content" />
|
||||
android:text="@string/label_uuid" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/data_value"
|
||||
android:layout_width="match_parent"
|
||||
android:id="@+id/uuid"
|
||||
style="@style/GridLayoutDataTextViewMonospace" />
|
||||
|
||||
<TextView
|
||||
style="@style/GridLayoutTitleTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/no_data"
|
||||
android:textSize="18sp" />
|
||||
</LinearLayout>
|
||||
android:text="@string/label_desc" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/description"
|
||||
style="@style/GridLayoutDataTextViewMonospace" />
|
||||
|
||||
<TextView
|
||||
style="@style/GridLayoutTitleTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_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="@string/label_as_array" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/data_as_array"
|
||||
style="@style/GridLayoutDataTextViewMonospace" />
|
||||
</GridLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/lowerSepparator"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_above="@id/gattInformation"
|
||||
android:background="@android:color/holo_blue_dark" />
|
||||
|
||||
<ExpandableListView
|
||||
android:id="@+id/gatt_services_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_above="@id/lowerSepparator"
|
||||
android:layout_below="@id/upperSepparator" />
|
||||
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
@@ -23,7 +23,7 @@
|
||||
style="@style/GridLayoutTitleTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="As String:" />
|
||||
android:text="@string/label_as_string" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/data_as_string"
|
||||
@@ -33,7 +33,7 @@
|
||||
style="@style/GridLayoutTitleTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="As Array:" />
|
||||
android:text="@string/label_as_array" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/data_as_array"
|
||||
|
||||
@@ -51,5 +51,8 @@
|
||||
<string name="header_device_info">Device Info</string>
|
||||
<string name="invalid_device_data">Invalid Device Data!</string>
|
||||
<string name="unknown">unknown</string>
|
||||
<string name="label_as_string">As String:</string>
|
||||
<string name="label_as_array">As Array:</string>
|
||||
<string name="label_desc">Desc:</string>
|
||||
|
||||
</resources>
|
||||
Reference in New Issue
Block a user