<?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:id="@+id/rootView" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/mainBackColor" android:orientation="vertical"> <com.pengxh.kt.lite.widget.TitleBarView android:id="@+id/titleView" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/mainThemeColor" app:tbv_show_right_image="false" app:tbv_smaller_title="true" app:tbv_text="添加设备" /> <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:inputType="number" android:maxLength="20" android:paddingVertical="@dimen/dp_5" android:singleLine="true" android:textColorHint="@color/hintTextColor" /> <ImageView android:id="@+id/scannerView" style="@style/RelativeRightImageStyle" android:src="@drawable/ic_scanner" /> </RelativeLayout> <View style="@style/DividerViewStyle" /> <RelativeLayout style="@style/RelativeItemLayoutStyle"> <TextView style="@style/RelativeTextViewStyle" android:text="设备名称" /> <TextView android:id="@+id/deviceNameView" style="@style/RelativeTextViewStyle" android:layout_alignParentEnd="true" android:text="燃气智能监测管盯" /> </RelativeLayout> <View style="@style/DividerViewStyle" /> <RelativeLayout style="@style/RelativeItemLayoutStyle"> <TextView android:id="@+id/tempView" style="@style/RelativeTextViewStyle" android:text="所属项目" /> <TextView android:id="@+id/ownerShipView" style="@style/RelativeTextViewStyle" android:layout_toStartOf="@id/ownerShipTempView" android:layout_toEndOf="@id/tempView" android:hint="请选择" android:maxLines="2" 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="72px" android:layout_height="72px" android:layout_gravity="center_vertical" android:layout_marginEnd="@dimen/dp_10" android:src="@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:layout_marginBottom="@dimen/dp_10" android:nestedScrollingEnabled="false" android:scrollbars="none" app:layoutManager="androidx.recyclerview.widget.GridLayoutManager" app:spanCount="3" /> <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:layout_marginBottom="@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" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="@dimen/dp_20" android:text="提交" /> </LinearLayout>