update GUI

master
Zhengyu Peng 3 years ago
parent 624edf5a6d
commit 5e3c2f44b0

@ -92,6 +92,11 @@ class DeviceListActivity : Activity() {
val pairedListView: ListView = findViewById<ListView>(R.id.paired_devices)
pairedListView.adapter = bluetoothAdapter
pairedListView.onItemClickListener = mDeviceClickListener
val cancelPicker = findViewById<TextView>(R.id.cancel_picker)
cancelPicker.setOnClickListener {
finish()
}
}
/**

@ -30,7 +30,7 @@
android:id="@+id/divider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?android:attr/listDivider" />
android:background="@color/grey_200" />
<ListView
android:id="@+id/paired_devices"
@ -39,4 +39,24 @@
android:stackFromBottom="false"
/>
<View
android:id="@+id/divider1"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/grey_200" />
<TextView
android:id="@+id/cancel_picker"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="24dp"
android:textAppearance="?attr/textAppearanceButton"
android:gravity="center_horizontal"
android:clickable="true"
android:focusable="true"
android:background="?attr/selectableItemBackground"
android:text="Cancel"
android:visibility="visible"
/>
</LinearLayout>

@ -100,6 +100,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:digits="0123456789."
android:backgroundTint="@color/grey_100"
android:hint="IP"
android:inputType="number|numberDecimal"
android:text="192.168.1.127" />
@ -123,6 +124,7 @@
android:id="@+id/port_input"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="@color/grey_100"
android:hint="Port"
android:inputType="number"
android:text="1234" />

@ -3,6 +3,7 @@
<color name="purple_200">#FFBB86FC</color>
<color name="purple_500">#FF6200EE</color>
<color name="purple_700">#FF3700B3</color>
<color name="grey_100">#FFF5F5F5</color>
<color name="grey_200">#FFEEEEEE</color>
<color name="grey_500">#FF9E9E9E</color>
<color name="grey_700">#FF616161</color>

Loading…
Cancel
Save