From ee5192138e349af06f84e16469c6b01f3265317c Mon Sep 17 00:00:00 2001 From: Zhengyu Peng Date: Tue, 22 Feb 2022 12:07:52 -0500 Subject: [PATCH] update UI --- .../hexapod/network/BluetoothService.kt | 14 - .../app/src/main/res/layout/activity_main.xml | 255 ++++++++++-------- .../src/main/res/layout/selected_device.xml | 4 +- 3 files changed, 152 insertions(+), 121 deletions(-) diff --git a/software/android/app/src/main/java/com/rookiedev/hexapod/network/BluetoothService.kt b/software/android/app/src/main/java/com/rookiedev/hexapod/network/BluetoothService.kt index 1bc3aa8..370c598 100644 --- a/software/android/app/src/main/java/com/rookiedev/hexapod/network/BluetoothService.kt +++ b/software/android/app/src/main/java/com/rookiedev/hexapod/network/BluetoothService.kt @@ -398,20 +398,6 @@ class BluetoothService(context: Context?, handler: Handler) { // given BluetoothDevice try { tmp = if (secure) { -// if (ActivityCompat.checkSelfPermission( -// this, -// Manifest.permission.BLUETOOTH_CONNECT -// ) != PackageManager.PERMISSION_GRANTED -// ) { -// // TODO: Consider calling -// // ActivityCompat#requestPermissions -// // here to request the missing permissions, and then overriding -// // public void onRequestPermissionsResult(int requestCode, String[] permissions, -// // int[] grantResults) -// // to handle the case where the user grants the permission. See the documentation -// // for ActivityCompat#requestPermissions for more details. -// return -// } mmDevice.createRfcommSocketToServiceRecord( MY_UUID_SECURE ) diff --git a/software/android/app/src/main/res/layout/activity_main.xml b/software/android/app/src/main/res/layout/activity_main.xml index 0d70ef4..e9c6646 100644 --- a/software/android/app/src/main/res/layout/activity_main.xml +++ b/software/android/app/src/main/res/layout/activity_main.xml @@ -1,131 +1,176 @@ - - - - + + - - + android:background="@color/white" + android:gravity="center_horizontal" + android:orientation="vertical" + android:paddingStart="16dp" + android:paddingEnd="16dp"> - + + + + app:layout_constraintBottom_toTopOf="@id/ip_input_layout" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/hexapod_logo"> + + - + - + + + + + - - + + - - - - - + + + + + + + + + + + + + + + + + + + + +