Newer
Older
MethaneInspection / app / src / main / res / layout / single_fragment_map_inspect.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/white"
    android:orientation="vertical">

    <View
        android:id="@+id/statusBarView"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:background="#00000000" />

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="#EFEFEF">

        <com.amap.api.maps.MapView
            android:id="@+id/mapView"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />

        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/constraintLayout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="#D6EEFE"
            android:paddingHorizontal="@dimen/dp_10"
            android:paddingVertical="3dp">

            <TextView
                android:id="@+id/deviceStatusView"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:fontFamily="sans-serif-medium"
                android:gravity="center_horizontal"
                android:paddingVertical="3dp"
                android:text="设备编号:未连接"
                android:textColor="#496677"
                android:textSize="@dimen/sp_16"
                app:layout_constraintTop_toTopOf="parent" />

            <TextView
                android:id="@+id/inspectNameView"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginEnd="5dp"
                android:hint="未开始巡检"
                android:paddingVertical="3dp"
                android:singleLine="true"
                android:textColor="@color/black"
                android:textSize="@dimen/sp_14"
                app:layout_constraintEnd_toStartOf="@id/inspectTimeView"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/deviceStatusView" />

            <TextView
                android:id="@+id/inspectTimeView"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="5dp"
                android:paddingVertical="3dp"
                android:textColor="@color/black"
                android:textSize="@dimen/sp_14"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toEndOf="@id/inspectNameView"
                app:layout_constraintTop_toBottomOf="@id/deviceStatusView" />
        </androidx.constraintlayout.widget.ConstraintLayout>

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@id/constraintLayout"
            android:layout_marginStart="15dp"
            android:layout_marginTop="@dimen/dp_10"
            android:orientation="vertical">

            <com.qmuiteam.qmui.alpha.QMUIAlphaImageButton
                android:id="@+id/stopInspectButton"
                style="@style/imageButtonStyle"
                android:src="@drawable/ic_off" />

            <com.qmuiteam.qmui.alpha.QMUIAlphaImageButton
                android:id="@+id/bluetoothButton"
                style="@style/imageButtonStyle"
                android:src="@drawable/ic_bluetooth" />

            <com.qmuiteam.qmui.alpha.QMUIAlphaImageButton
                android:id="@+id/retrySendButton"
                style="@style/imageButtonStyle"
                android:src="@drawable/ic_refresh" />

            <com.qmuiteam.qmui.alpha.QMUIAlphaImageButton
                android:id="@+id/addInspectionButton"
                style="@style/imageButtonStyle"
                android:src="@drawable/ic_add_black" />
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_above="@id/newEventButton"
            android:layout_marginHorizontal="20dp"
            android:orientation="horizontal">

            <androidx.cardview.widget.CardView
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginEnd="5dp"
                android:layout_weight="1"
                app:cardCornerRadius="5dp">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:background="@color/white"
                    android:gravity="center_horizontal"
                    android:orientation="vertical">

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="20dp"
                        android:layout_marginBottom="@dimen/dp_10"
                        android:text="当前测量值"
                        android:textColor="@color/black" />

                    <TextView
                        android:id="@+id/currentValueView"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="@dimen/dp_10"
                        android:layout_marginBottom="20dp"
                        android:text="--"
                        android:textColor="@color/black" />
                </LinearLayout>
            </androidx.cardview.widget.CardView>

            <androidx.cardview.widget.CardView
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginEnd="5dp"
                android:layout_weight="1"
                app:cardCornerRadius="5dp">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:background="@color/white"
                    android:gravity="center_horizontal"
                    android:orientation="vertical">

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="20dp"
                        android:layout_marginBottom="@dimen/dp_10"
                        android:text="报警设置值"
                        android:textColor="@color/black" />

                    <TextView
                        android:id="@+id/settingsValueView"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="@dimen/dp_10"
                        android:layout_marginBottom="20dp"
                        android:text="--"
                        android:textColor="@color/black" />
                </LinearLayout>
            </androidx.cardview.widget.CardView>

            <androidx.cardview.widget.CardView
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginEnd="5dp"
                android:layout_weight="1"
                app:cardCornerRadius="5dp">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:background="@color/white"
                    android:gravity="center_horizontal"
                    android:orientation="vertical">

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="20dp"
                        android:layout_marginBottom="@dimen/dp_10"
                        android:text="最大值"
                        android:textColor="@color/black" />

                    <TextView
                        android:id="@+id/maxValueView"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="@dimen/dp_10"
                        android:layout_marginBottom="20dp"
                        android:text="--"
                        android:textColor="@color/black" />
                </LinearLayout>
            </androidx.cardview.widget.CardView>
        </LinearLayout>

        <Button
            android:id="@+id/newEventButton"
            style="@style/MainButtonStyle"
            android:layout_alignParentBottom="true"
            android:layout_marginHorizontal="20dp"
            android:layout_marginTop="20dp"
            android:layout_marginBottom="20dp"
            android:text="新建事件" />
    </RelativeLayout>
</LinearLayout>