mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
begin making new bt scan gui
This commit is contained in:
parent
4e6d1be954
commit
bd65bfee0a
9 changed files with 178 additions and 52 deletions
30
app/src/main/java/com/geeksville/mesh/ui/BTScanCard.kt
Normal file
30
app/src/main/java/com/geeksville/mesh/ui/BTScanCard.kt
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
package com.geeksville.mesh.ui
|
||||
|
||||
import androidx.compose.Composable
|
||||
import androidx.compose.Model
|
||||
import androidx.ui.core.Text
|
||||
import androidx.ui.layout.Column
|
||||
import androidx.ui.layout.Row
|
||||
import androidx.ui.tooling.preview.Preview
|
||||
|
||||
@Model
|
||||
data class BTScanEntry(val name: String, val macAddress: String, var selected: Boolean)
|
||||
|
||||
@Composable
|
||||
fun BTScanCard(node: BTScanEntry) {
|
||||
// Text("Node: ${it.user?.longName}")
|
||||
Row {
|
||||
Text(node.name)
|
||||
|
||||
Text(node.selected.toString())
|
||||
}
|
||||
}
|
||||
|
||||
@Preview
|
||||
@Composable
|
||||
fun btScanPreview() {
|
||||
Column {
|
||||
BTScanCard(BTScanEntry("Meshtastic_ab12", "xx", true))
|
||||
BTScanCard(BTScanEntry("Meshtastic_32ac", "xx", false))
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue