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

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

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

        <androidx.cardview.widget.CardView
            android:id="@+id/descriptionCardView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginHorizontal="@dimen/margin_10dp"
            android:layout_marginTop="@dimen/margin_10dp"
            app:cardCornerRadius="5dp"
            app:layout_constraintTop_toTopOf="parent">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_margin="@dimen/margin_10dp"
                android:orientation="vertical">

                <RelativeLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginBottom="@dimen/margin_10dp">

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="事件发生时间"
                        android:textColor="@color/black"
                        android:textSize="@dimen/textFontSize" />

                    <TextView
                        android:id="@+id/eventCreateTimeView"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_alignParentEnd="true"
                        android:text="2021-07-16 11:10:55"
                        android:textColor="@color/darkGray"
                        android:textSize="@dimen/textFontSize" />
                </RelativeLayout>

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

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:paddingVertical="@dimen/padding_10dp"
                    android:text="请输入事件情况说明"
                    android:textColor="@color/black"
                    android:textSize="@dimen/textFontSize" />

                <EditText
                    android:id="@+id/eventEditTextView"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:background="@drawable/bg_layout_white"
                    android:hint="如:xxx小区xx单元减压阀泄露"
                    android:paddingHorizontal="5dp"
                    android:paddingVertical="@dimen/padding_10dp"
                    android:textColor="@color/black"
                    android:textColorHint="@color/hintColor"
                    android:textSize="@dimen/textFontSize" />
            </LinearLayout>
        </androidx.cardview.widget.CardView>

        <androidx.cardview.widget.CardView
            android:id="@+id/inspectCardView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginHorizontal="@dimen/margin_10dp"
            android:layout_marginTop="@dimen/margin_10dp"
            app:cardCornerRadius="5dp"
            app:layout_constraintTop_toBottomOf="@id/descriptionCardView">

            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_margin="@dimen/margin_10dp">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_centerVertical="true"
                    android:text="最大泄露数值"
                    android:textColor="@color/black"
                    android:textSize="@dimen/textFontSize" />

                <EditText
                    android:id="@+id/inspectNumberView"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignParentEnd="true"
                    android:layout_centerVertical="true"
                    android:background="@drawable/bg_layout_white"
                    android:gravity="end"
                    android:hint="如:9999"
                    android:inputType="numberDecimal"
                    android:maxLength="9"
                    android:padding="5dp"
                    android:textColor="@color/black"
                    android:textColorHint="@color/hintColor"
                    android:textSize="@dimen/textFontSize" />
            </RelativeLayout>
        </androidx.cardview.widget.CardView>

        <androidx.cardview.widget.CardView
            android:id="@+id/imageCardView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginHorizontal="@dimen/margin_10dp"
            android:layout_marginTop="@dimen/margin_10dp"
            app:cardCornerRadius="5dp"
            app:layout_constraintTop_toBottomOf="@id/inspectCardView">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_margin="@dimen/margin_10dp"
                android:orientation="vertical">

                <RelativeLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content">

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="图片"
                        android:textColor="@color/black"
                        android:textSize="@dimen/textFontSize" />

                    <ImageView
                        android:id="@+id/addImageView"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_alignParentEnd="true"
                        android:src="@drawable/ic_add_blue" />
                </RelativeLayout>

                <GridView
                    android:id="@+id/imageGridView"
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:layout_marginTop="@dimen/margin_10dp"
                    android:layout_weight="1"
                    android:horizontalSpacing="@dimen/margin_10dp"
                    android:numColumns="3"
                    android:scrollbars="none"
                    android:verticalSpacing="@dimen/margin_10dp" />
            </LinearLayout>
        </androidx.cardview.widget.CardView>

        <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
            android:id="@+id/addEventButton"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginHorizontal="30dp"
            android:layout_marginBottom="25dp"
            android:paddingVertical="7dp"
            android:text="保存记录"
            android:textColor="@color/white"
            android:textSize="@dimen/titleFontSize"
            app:layout_constraintBottom_toBottomOf="parent"
            app:qmui_backgroundColor="@color/mainThemeColor"
            app:qmui_borderColor="@color/mainThemeColor"
            app:qmui_radius="20dp" />
    </androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>