aboutsummaryrefslogtreecommitdiff
path: root/androidApp/src/main/res/layout/unit_details_commands.xml
blob: 01aefb85a2bb0391bdf13851eb30b1019d876252 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <com.google.android.material.card.MaterialCardView
            android:id="@+id/commandsCard"
            android:layout_width="0dp"
            android:layout_height="0dp"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintBottom_toBottomOf="parent"
            app:cardCornerRadius="@dimen/card_border_radius"
            app:cardElevation="@dimen/card_elevation"
            app:cardUseCompatPadding="true">

            <androidx.constraintlayout.widget.ConstraintLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="vertical">

                <TextView
                    android:id="@+id/nameDetail"
                    style="@style/TextAppearance.AppCompat.Headline"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:textColor="@color/colorPrimaryDark"
                    android:layout_margin="@dimen/card_padding"
                    android:layout_marginBottom="@dimen/margin"
                    app:layout_constraintTop_toTopOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintBottom_toTopOf="@id/commandsList"
                    tools:text="1AAUTO" />

                <ListView
                    android:id="@+id/commandsList"
                    android:layout_width="0dp"
                    android:layout_height="0dp"
                    android:choiceMode="singleChoice"
                    android:listSelector="@color/darkBackground"
                    app:layout_constraintTop_toBottomOf="@id/nameDetail"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintBottom_toTopOf="@id/sendCommandButton" />

                <com.google.android.material.button.MaterialButton
                    android:id="@+id/sendCommandButton"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_margin="@dimen/margin"
                    android:text="@string/send_command"
                    android:enabled="false"
                    app:layout_constraintTop_toBottomOf="@id/commandsList"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    />

            </androidx.constraintlayout.widget.ConstraintLayout>

        </com.google.android.material.card.MaterialCardView>

    </androidx.constraintlayout.widget.ConstraintLayout>

    <include
        android:id="@+id/reportLoading"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        layout="@layout/loading_indicator"
        android:visibility="gone"/>

</FrameLayout>