From e58e66125acccbd9b79573a520f9a6140bc47506 Mon Sep 17 00:00:00 2001 From: mac <user@users-MacBook-Pro.local> Date: 星期二, 05 十一月 2024 13:23:22 +0800 Subject: [PATCH] 2024年11月05日13:23:06 --- app/src/main/res/layout/fragment_house_list.xml | 105 +++++++++++++++++++++++++++++----------------------- 1 files changed, 58 insertions(+), 47 deletions(-) diff --git a/app/src/main/res/layout/fragment_house_list.xml b/app/src/main/res/layout/fragment_house_list.xml index 053fc29..9f0f42b 100644 --- a/app/src/main/res/layout/fragment_house_list.xml +++ b/app/src/main/res/layout/fragment_house_list.xml @@ -63,7 +63,7 @@ </RelativeLayout> <!--鐢电珯鏍囩--> - <LinearLayout + <androidx.constraintlayout.widget.ConstraintLayout android:id="@+id/power_station_label_parent" android:layout_width="match_parent" android:layout_height="0dp" @@ -77,7 +77,10 @@ android:id="@+id/power_station_label_top_cl" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginTop="@dimen/dp_13"> + android:layout_marginTop="@dimen/dp_13" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent"> <!--鎼滅储--> <RelativeLayout android:id="@+id/power_station_search_cl" @@ -161,14 +164,14 @@ </LinearLayout> - <!--鍗囧簭闄嶅簭鍔熻兘--> <LinearLayout android:id="@+id/ascending_order_descending_order_parent_ll" - android:layout_width="match_parent" + android:layout_width="0dp" android:layout_height="@dimen/dp_17" android:layout_marginStart="@dimen/dp_16" android:layout_marginTop="@dimen/dp_21" + android:layout_marginEnd="@dimen/dp_12" android:orientation="horizontal" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" @@ -178,6 +181,7 @@ android:id="@+id/station_name_rl" android:layout_width="wrap_content" android:layout_height="match_parent" + android:gravity="start" android:orientation="horizontal"> <TextView @@ -197,17 +201,19 @@ android:layout_toEndOf="@+id/station_name_tv" android:background="@drawable/ascending_descending_order_select" /> - <View - android:layout_width="@dimen/dp_16" - android:layout_height="match_parent" - android:layout_toEndOf="@+id/station_name_iv" /> + </RelativeLayout> + <View + android:layout_width="0dp" + android:layout_height="match_parent" + android:layout_weight="1" /> <RelativeLayout android:id="@+id/station_power_rl" android:layout_width="wrap_content" android:layout_height="match_parent" + android:layout_gravity="center_horizontal" android:orientation="horizontal"> <TextView @@ -225,17 +231,18 @@ android:layout_toEndOf="@+id/station_power_tv" android:background="@drawable/ascending_descending_order_select" /> - <View - android:layout_width="@dimen/dp_16" - android:layout_height="match_parent" - android:layout_toEndOf="@+id/station_power_iv" /> </RelativeLayout> + <View + android:layout_width="0dp" + android:layout_height="match_parent" + android:layout_weight="1" /> <RelativeLayout android:id="@+id/station_day_rl" android:layout_width="wrap_content" android:layout_height="match_parent" + android:layout_gravity="center_horizontal" android:orientation="horizontal"> <TextView @@ -253,17 +260,19 @@ android:layout_toEndOf="@+id/station_day_tv" android:background="@drawable/ascending_descending_order_select" /> - <View - android:layout_width="@dimen/dp_16" - android:layout_height="match_parent" - android:layout_toEndOf="@+id/station_day_iv" /> + </RelativeLayout> + <View + android:layout_width="0dp" + android:layout_height="match_parent" + android:layout_weight="1" /> <RelativeLayout android:id="@+id/station_month_rl" android:layout_width="wrap_content" android:layout_height="match_parent" + android:gravity="end" android:orientation="horizontal"> <TextView @@ -282,7 +291,6 @@ android:background="@drawable/ascending_descending_order_select" /> </RelativeLayout> - </LinearLayout> </androidx.constraintlayout.widget.ConstraintLayout> @@ -290,7 +298,7 @@ <androidx.swiperefreshlayout.widget.SwipeRefreshLayout android:id="@+id/fragment_house_srl" android:layout_width="match_parent" - android:layout_height="match_parent" + android:layout_height="0dp" android:layout_marginTop="@dimen/dp_21" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" @@ -302,12 +310,23 @@ android:layout_width="match_parent" android:layout_height="match_parent" /> </androidx.swiperefreshlayout.widget.SwipeRefreshLayout> + <!--娌℃湁鏁版嵁鏄剧ず鏍峰紡--> + <include + android:id="@+id/home_null_data_ic" + layout="@layout/null_data_view" + android:layout_width="match_parent" + android:layout_height="224dp" + android:visibility="gone" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/power_station_label_top_cl" /> - </LinearLayout> + </androidx.constraintlayout.widget.ConstraintLayout> <!--璁惧鏍囩--> - <LinearLayout + <androidx.constraintlayout.widget.ConstraintLayout android:id="@+id/device_label_parent" android:layout_width="match_parent" android:layout_height="0dp" @@ -322,7 +341,10 @@ android:id="@+id/device_label_top_cl" android:layout_width="match_parent" android:layout_height="40dp" - android:layout_marginTop="@dimen/dp_13"> + android:layout_marginTop="@dimen/dp_13" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent"> <!--鎼滅储--> <RelativeLayout android:id="@+id/device_search_cl" @@ -362,11 +384,11 @@ <androidx.swiperefreshlayout.widget.SwipeRefreshLayout android:id="@+id/fragment_device_srl" android:layout_width="match_parent" - android:layout_height="match_parent" + android:layout_height="0dp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/power_station_label_top_cl"> + app:layout_constraintTop_toBottomOf="@+id/device_label_top_cl"> <androidx.recyclerview.widget.RecyclerView android:id="@+id/fragment_device_srl_list_rc" @@ -376,32 +398,21 @@ android:paddingBottom="@dimen/dp_16" /> </androidx.swiperefreshlayout.widget.SwipeRefreshLayout> + <!--娌℃湁鏁版嵁鏄剧ず鏍峰紡--> + <include + android:id="@+id/device_null_data_ic" + layout="@layout/null_data_view" + android:layout_width="match_parent" + android:layout_height="224dp" + android:visibility="gone" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/device_label_top_cl" - </LinearLayout> + /> - <!--娌℃湁鏁版嵁鏄剧ず鏍峰紡--> - <include - android:id="@+id/home_null_data_ic" - layout="@layout/null_data_view" - android:layout_width="match_parent" - android:layout_height="224dp" - android:layout_marginBottom="@dimen/dp_202" - android:visibility="gone" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" /> - - <!--娌℃湁鏁版嵁鏄剧ず鏍峰紡--> - <include - android:id="@+id/device_null_data_ic" - layout="@layout/null_data_view" - android:layout_width="match_parent" - android:layout_height="224dp" - android:layout_marginBottom="229dp" - android:visibility="gone" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" /> + </androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout> -- Gitblit v1.8.0