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) val pairedListView: ListView = findViewById<ListView>(R.id.paired_devices)
pairedListView.adapter = bluetoothAdapter pairedListView.adapter = bluetoothAdapter
pairedListView.onItemClickListener = mDeviceClickListener pairedListView.onItemClickListener = mDeviceClickListener
val cancelPicker = findViewById<TextView>(R.id.cancel_picker)
cancelPicker.setOnClickListener {
finish()
}
} }
/** /**

@ -30,7 +30,7 @@
android:id="@+id/divider" android:id="@+id/divider"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:background="?android:attr/listDivider" /> android:background="@color/grey_200" />
<ListView <ListView
android:id="@+id/paired_devices" android:id="@+id/paired_devices"
@ -39,4 +39,24 @@
android:stackFromBottom="false" 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> </LinearLayout>

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

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

Loading…
Cancel
Save