Newer
Older
CasicSmartTube / app / src / main / res / layout / activity_add_device.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/mainBackColor"
    android:orientation="vertical"
    tools:context=".view.AddDeviceActivity">

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

    <androidx.core.widget.NestedScrollView
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:scrollbars="vertical">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="@dimen/dp_10"
            android:background="@drawable/bg_solid_layout_white_radius_10"
            android:orientation="vertical">

            <RelativeLayout style="@style/RelativeItemLayoutStyle">

                <TextView
                    style="@style/RelativeTextViewStyle"
                    android:text="设备编号" />

                <EditText
                    android:id="@+id/deviceCodeView"
                    style="@style/RelativeTextViewStyle"
                    android:layout_toStartOf="@id/scannerView"
                    android:background="@null"
                    android:hint="请输入设备编号或者扫描添加"
                    android:maxLength="20"
                    android:paddingVertical="@dimen/dp_5"
                    android:singleLine="true"
                    android:textColorHint="@color/hintTextColor" />

                <ImageView
                    android:id="@+id/scannerView"
                    style="@style/RelativeRightImageStyle"
                    android:background="@drawable/ic_scanner" />
            </RelativeLayout>

            <View style="@style/DividerViewStyle" />

            <RelativeLayout style="@style/RelativeItemLayoutStyle">

                <TextView
                    style="@style/RelativeTextViewStyle"
                    android:text="设备名称" />

                <EditText
                    android:id="@+id/deviceNameView"
                    style="@style/RelativeTextViewStyle"
                    android:layout_toStartOf="@id/deviceNameTempView"
                    android:background="@null"
                    android:hint="@string/unknown"
                    android:maxLength="20"
                    android:paddingVertical="@dimen/dp_5"
                    android:singleLine="true"
                    android:textColorHint="@color/hintTextColor" />

                <ImageView
                    android:id="@+id/deviceNameTempView"
                    style="@style/RelativeRightImageStyle" />
            </RelativeLayout>

            <View style="@style/DividerViewStyle" />

            <RelativeLayout style="@style/RelativeItemLayoutStyle">

                <TextView
                    style="@style/RelativeTextViewStyle"
                    android:text="所属项目" />

                <TextView
                    android:id="@+id/ownerShipView"
                    style="@style/RelativeTextViewStyle"
                    android:layout_toStartOf="@id/ownerShipTempView"
                    android:hint="请选择"
                    android:textColorHint="@color/hintTextColor" />

                <ImageView
                    android:id="@+id/ownerShipTempView"
                    style="@style/RelativeRightImageStyle" />
            </RelativeLayout>

            <View style="@style/DividerViewStyle" />

            <RelativeLayout style="@style/RelativeItemLayoutStyle">

                <TextView
                    style="@style/RelativeTextViewStyle"
                    android:text="采集间隔" />

                <TextView
                    android:id="@+id/collectIntervalView"
                    style="@style/RelativeTextViewStyle"
                    android:layout_toStartOf="@id/intervalTempView"
                    android:hint="请选择"
                    android:textColorHint="@color/hintTextColor" />

                <ImageView
                    android:id="@+id/intervalTempView"
                    style="@style/RelativeRightImageStyle" />
            </RelativeLayout>

            <View style="@style/DividerViewStyle" />

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="112dp"
                android:orientation="horizontal">

                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:orientation="vertical">

                    <RelativeLayout style="@style/RelativeItemLayoutStyle">

                        <TextView
                            style="@style/RelativeTextViewStyle"
                            android:text="经度" />

                        <TextView
                            android:id="@+id/longitudeView"
                            style="@style/RelativeTextViewStyle"
                            android:layout_alignParentEnd="true"
                            android:hint="请点击右边定位自动获取"
                            android:textColorHint="@color/hintTextColor" />
                    </RelativeLayout>

                    <View style="@style/DividerViewStyle" />

                    <RelativeLayout style="@style/RelativeItemLayoutStyle">

                        <TextView
                            style="@style/RelativeTextViewStyle"
                            android:text="纬度" />

                        <TextView
                            android:id="@+id/latitudeView"
                            style="@style/RelativeTextViewStyle"
                            android:layout_alignParentEnd="true"
                            android:hint="请点击右边定位自动获取"
                            android:textColorHint="@color/hintTextColor" />
                    </RelativeLayout>
                </LinearLayout>

                <ImageView
                    android:id="@+id/locationImageView"
                    android:layout_width="64px"
                    android:layout_height="64px"
                    android:layout_gravity="center_vertical"
                    android:layout_marginEnd="@dimen/dp_10"
                    android:background="@mipmap/well_location" />
            </LinearLayout>

            <View style="@style/DividerViewStyle" />

            <TextView
                style="@style/RelativeTextViewStyle"
                android:layout_width="match_parent"
                android:layout_height="@dimen/itemLayoutHeight"
                android:gravity="start|center_vertical"
                android:text="现场图片" />

            <androidx.recyclerview.widget.RecyclerView
                android:id="@+id/addImageRecyclerView"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginHorizontal="@dimen/dp_10"
                android:nestedScrollingEnabled="false"
                android:scrollbars="none" />

            <View style="@style/DividerViewStyle" />

            <RelativeLayout style="@style/RelativeItemLayoutStyle">

                <TextView
                    style="@style/RelativeTextViewStyle"
                    android:text="描述" />

                <TextView
                    android:id="@+id/inputLengthView"
                    style="@style/RelativeTextViewStyle"
                    android:layout_alignParentEnd="true"
                    android:text="0/100"
                    android:textColor="@color/subTextColor"
                    android:textSize="@dimen/sp_14" />
            </RelativeLayout>

            <com.pengxh.kt.lite.widget.DeleteEditText
                android:id="@+id/sceneEditView"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginHorizontal="@dimen/dp_10"
                android:background="@drawable/bg_stroke_layout_radius_3"
                android:gravity="top"
                android:inputType="textMultiLine"
                android:padding="@dimen/dp_3"
                android:paddingVertical="@dimen/dp_5"
                android:textColor="@color/subTextColor"
                android:textColorHint="@color/hintTextColor" />

            <View style="@style/DividerViewStyle" />

            <RelativeLayout style="@style/RelativeItemLayoutStyle">

                <TextView
                    style="@style/RelativeTextViewStyle"
                    android:text="时间" />

                <TextView
                    android:id="@+id/addDeviceTimeView"
                    style="@style/RelativeTextViewStyle"
                    android:layout_alignParentEnd="true" />
            </RelativeLayout>
        </LinearLayout>
    </androidx.core.widget.NestedScrollView>

    <Button
        android:id="@+id/submitButton"
        style="@style/MainButtonStyle"
        android:layout_margin="@dimen/dp_20"
        android:text="提交" />
</LinearLayout>