<?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" 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.SearchDeviceActivity"> <RelativeLayout android:layout_width="match_parent" android:layout_height="@dimen/titleViewHeight" android:background="@color/mainThemeColor"> <ImageView android:id="@+id/leftBackView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerVertical="true" android:layout_marginStart="@dimen/dp_10" android:background="@drawable/ic_left_white" /> <TextView android:id="@+id/titleView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:gravity="center" android:text="@string/app_name" android:textColor="@color/white" android:textSize="@dimen/titleFontSize" /> <ImageView android:id="@+id/rightOptionView" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_alignParentEnd="true" android:paddingHorizontal="@dimen/dp_10" android:src="@drawable/ic_screen" /> </RelativeLayout> <androidx.drawerlayout.widget.DrawerLayout android:id="@+id/rightDrawerLayout" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true" tools:openDrawer="right"> <!-- 内容区 --> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent"> <include layout="@layout/include_empty_view" /> <com.scwang.smartrefresh.layout.SmartRefreshLayout android:id="@+id/resultRefreshLayout" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginTop="@dimen/dp_10"> <com.scwang.smartrefresh.layout.header.ClassicsHeader android:layout_width="match_parent" android:layout_height="wrap_content" /> <androidx.recyclerview.widget.RecyclerView android:id="@+id/resultRecyclerView" android:layout_width="match_parent" android:layout_height="wrap_content" app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" /> <com.scwang.smartrefresh.layout.footer.ClassicsFooter android:layout_width="match_parent" android:layout_height="wrap_content" /> </com.scwang.smartrefresh.layout.SmartRefreshLayout> </LinearLayout> <!-- 侧滑抽屉区 android:clickable="true"可解决点击事件穿透问题--> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_gravity="end" android:background="@color/white" android:clickable="true" android:focusable="true" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="@dimen/itemLayoutHeight" android:orientation="horizontal"> <TextView style="@style/textViewStyle" android:text="设备编号" /> <EditText android:id="@+id/deviceCodeView" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@null" android:gravity="end|center_vertical" android:hint="请输入设备编号" android:paddingHorizontal="@dimen/dp_10" android:singleLine="true" android:textColor="@color/mainTextColor" android:textSize="@dimen/textFontSize" android:theme="@style/EditTextTheme" /> </LinearLayout> <View style="@style/dividerViewStyle" /> <LinearLayout android:layout_width="match_parent" android:layout_height="@dimen/itemLayoutHeight" android:orientation="horizontal"> <TextView style="@style/textViewStyle" android:text="区域" /> <TextView android:id="@+id/areaView" android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" android:gravity="center_vertical|end" android:hint="请选择" android:paddingHorizontal="@dimen/dp_10" android:textColor="@color/subTextColor" android:textSize="@dimen/textFontSize" /> </LinearLayout> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:padding="@dimen/dp_20"> <Button android:id="@+id/clearButton" style="@style/WhiteButtonStyle" android:layout_width="0dp" android:layout_marginEnd="@dimen/dp_10" android:layout_weight="1" android:text="清空" /> <Button android:id="@+id/searchButton" style="@style/MainButtonStyle" android:layout_width="0dp" android:layout_marginStart="@dimen/dp_10" android:layout_weight="1" android:text="查询" /> </LinearLayout> </LinearLayout> </androidx.drawerlayout.widget.DrawerLayout> </LinearLayout>