This commit is contained in:
Zhengyu Peng
2022-02-20 22:33:07 -05:00
parent 0a7338fc16
commit 756fee013c
7 changed files with 277 additions and 13 deletions

View File

@ -55,7 +55,8 @@
app:layout_constraintBottom_toTopOf="@id/port_input_layout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tab">
app:layout_constraintTop_toBottomOf="@+id/tab"
android:visibility="visible">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/ip_input"
@ -73,10 +74,11 @@
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
app:errorEnabled="true"
app:layout_constraintBottom_toTopOf="@id/button_connect"
app:layout_constraintBottom_toTopOf="@id/paired_devices"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ip_input_layout">
app:layout_constraintTop_toBottomOf="@id/ip_input_layout"
android:visibility="visible">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/port_input"
@ -88,6 +90,26 @@
</com.google.android.material.textfield.TextInputLayout>
<ListView
android:id="@+id/paired_devices"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:stackFromBottom="true"
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/port_input_layout"
app:layout_constraintBottom_toTopOf="@id/button_connect"
android:visibility="visible"/>
<!-- <include-->
<!-- layout="@layout/device_name"-->
<!-- app:layout_constraintEnd_toEndOf="parent"-->
<!-- app:layout_constraintHorizontal_bias="1.0"-->
<!-- app:layout_constraintStart_toStartOf="parent"-->
<!-- app:layout_constraintTop_toBottomOf="@+id/paired_devices" />-->
<Button
android:id="@+id/button_connect"
android:layout_width="0dp"
@ -98,7 +120,7 @@
android:text="Connect"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/port_input_layout" />
app:layout_constraintTop_toBottomOf="@id/paired_devices" />
<TextView
android:id="@+id/textView_github"

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2014 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:textSize="18sp"
/>

View File

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/imageView"
android:layout_width="40dp"
android:layout_height="40dp"
android:padding="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toStartOf="@+id/textView"
app:srcCompat="@drawable/ic_baseline_bluetooth_24" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?attr/textAppearanceHeadline6"
android:text="TextView"
app:layout_constraintBottom_toTopOf="@+id/textView2"
app:layout_constraintStart_toEndOf="@+id/imageView"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?attr/textAppearanceBody2"
android:text="TextView"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/imageView"
app:layout_constraintTop_toBottomOf="@+id/textView" />
<ImageView
android:id="@+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_baseline_menu_24" />
</androidx.constraintlayout.widget.ConstraintLayout>