Meshtastic-Android/app/src/main/res/layout/adapter_node_layout.xml

115 lines
4.9 KiB
XML
Raw Normal View History

2020-04-08 15:25:57 -07:00
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
2020-04-08 15:25:57 -07:00
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
2020-04-08 15:25:57 -07:00
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
>
2020-04-08 15:25:57 -07:00
2020-04-08 15:36:49 -07:00
<com.google.android.material.card.MaterialCardView
style="@style/Widget.App.CardView"
android:id="@+id/nodeCard"
2020-04-08 15:25:57 -07:00
android:layout_width="match_parent"
2020-04-08 15:36:49 -07:00
android:layout_height="wrap_content"
android:layout_margin="8dp"
>
2020-04-08 15:25:57 -07:00
2020-04-08 15:36:49 -07:00
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="8dp"
>
2020-04-08 15:36:49 -07:00
2022-09-27 16:29:41 -03:00
<com.google.android.material.chip.Chip
android:id="@+id/chip_node"
android:layout_width="72dp"
2020-04-08 16:49:27 -07:00
android:layout_height="wrap_content"
2022-09-27 16:29:41 -03:00
android:textAlignment="center"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="@string/some_username"
/>
2020-04-08 16:49:27 -07:00
2020-04-08 15:36:49 -07:00
<TextView
android:id="@+id/nodeNameView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
2020-04-08 16:49:27 -07:00
android:layout_marginStart="8dp"
2022-09-27 16:29:41 -03:00
app:layout_constraintStart_toEndOf="@+id/chip_node"
app:layout_constraintTop_toTopOf="@+id/chip_node"
tools:text="@string/unknown_username"
/>
2020-04-08 16:49:27 -07:00
<TextView
android:id="@+id/distance_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@+id/chip_node"
app:layout_constraintBottom_toTopOf="@id/envMetrics"
2022-09-27 16:29:41 -03:00
app:layout_constraintStart_toStartOf="@+id/chip_node"
app:layout_constraintEnd_toEndOf="@+id/chip_node"
android:layout_marginVertical="8dp"
app:layout_constraintVertical_bias="0"
tools:text="@string/sample_distance"
/>
<androidx.compose.ui.platform.ComposeView
android:id="@+id/nodePosition"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
2022-09-27 16:29:41 -03:00
app:layout_constraintStart_toEndOf="@+id/chip_node"
app:layout_constraintTop_toBottomOf="@+id/nodeNameView"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
tools:composableName="com.geeksville.mesh.ui.LinkedCoordinatesKt.LinkedCoordinatesPreview"
/>
<androidx.compose.ui.platform.ComposeView
android:id="@+id/batteryInfo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
2022-10-30 17:19:10 -03:00
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
tools:composableName="com.geeksville.mesh.ui.BatteryInfoKt.BatteryInfoPreviewSimple"
/>
<androidx.compose.ui.platform.ComposeView
android:id="@+id/lastHeardInfo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@+id/batteryInfo"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginTop="4dp"
tools:composableName="com.geeksville.mesh.ui.LastHeardInfoKt.LastHeardInfoPreview"
/>
2021-03-22 21:10:58 -07:00
<TextView
android:id="@+id/signalView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/lastHeardInfo"
2022-09-27 16:29:41 -03:00
app:layout_constraintBottom_toTopOf="@id/envMetrics"
2021-03-22 21:10:58 -07:00
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintVertical_bias="0"
android:layout_marginTop="4dp"
android:layout_marginBottom="8dp"
tools:text="RSSI: -40 SNR: -8"
/>
2022-09-12 18:23:59 -03:00
<TextView
android:id="@+id/envMetrics"
android:layout_width="0dp"
2022-09-12 18:23:59 -03:00
android:layout_height="wrap_content"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
tools:visibility="visible"
tools:background="@android:color/holo_red_light"
/>
2021-03-22 21:10:58 -07:00
2020-04-08 15:36:49 -07:00
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
</LinearLayout>