Newer
Older
MethaneInspection / app / src / main / res / layout / activity_map.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:orientation="vertical">

    <include layout="@layout/include_base_title" />

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/layoutColor">

        <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/padding_10dp"
            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/textFontSize"
                app:layout_constraintTop_toTopOf="parent" />

            <TextView
                android:id="@+id/inspectNameView"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginEnd="5dp"
                android:fontFamily="sans-serif-medium"
                android:paddingVertical="3dp"
                android:singleLine="true"
                android:text="@string/app_name"
                android:textColor="@color/black"
                android:textSize="@dimen/textFontSize"
                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:fontFamily="sans-serif-medium"
                android:paddingVertical="3dp"
                android:text="yyyy-MM-dd HH:mm:ss"
                android:textColor="@color/black"
                android:textSize="@dimen/textFontSize"
                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/margin_10dp"
            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_empty" />

            <com.qmuiteam.qmui.alpha.QMUIAlphaImageButton
                android:id="@+id/refreshButton"
                style="@style/imageButtonStyle"
                android:src="@drawable/ic_refresh" />
        </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: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/margin_10dp"
                        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/margin_10dp"
                        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: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/margin_10dp"
                        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/margin_10dp"
                        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: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/margin_10dp"
                        android:text="5s内最大值"
                        android:textColor="@color/black" />

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

        <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
            android:id="@+id/newEventButton"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:layout_marginHorizontal="20dp"
            android:layout_marginTop="20dp"
            android:layout_marginBottom="20dp"
            android:paddingVertical="7dp"
            android:text="新建事件"
            android:textColor="@color/white"
            android:textSize="@dimen/titleFontSize"
            app:qmui_backgroundColor="@color/mainThemeColor"
            app:qmui_borderColor="@color/mainThemeColor"
            app:qmui_radius="5dp" />
    </RelativeLayout>
</LinearLayout>