From a034e242fe844a1ca45d2a28710cb7face1f8fe6 Mon Sep 17 00:00:00 2001 From: mac <user@users-MacBook-Pro.local> Date: 星期日, 28 四月 2024 19:07:56 +0800 Subject: [PATCH] 2024年04月28日19:07:49 --- app/src/main/res/layout/fragment_home_page.xml | 566 +++++++++++++++++++++++++++++++++++++++++++++----------- 1 files changed, 454 insertions(+), 112 deletions(-) diff --git a/app/src/main/res/layout/fragment_home_page.xml b/app/src/main/res/layout/fragment_home_page.xml index 0eddf0e..cb8fa80 100644 --- a/app/src/main/res/layout/fragment_home_page.xml +++ b/app/src/main/res/layout/fragment_home_page.xml @@ -12,77 +12,76 @@ android:layout_width="wrap_content" android:layout_height="@dimen/dp_24" android:layout_marginStart="@dimen/dp_16" - android:layout_marginTop="@dimen/dp_9" + android:layout_marginTop="58dp" android:text="@string/power_shome_page" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> <ImageView android:id="@+id/home_page_station_add_iv" - android:layout_width="@dimen/dp_18" - android:layout_height="@dimen/dp_18" - android:layout_marginTop="@dimen/dp_9" + android:layout_width="@dimen/dp_31" + android:layout_height="@dimen/dp_31" + android:layout_marginTop="53dp" android:layout_marginEnd="@dimen/dp_24" android:src="@drawable/add" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent" /> - <LinearLayout - android:id="@+id/home_page_station_ll" - android:layout_width="0dp" - android:layout_height="@dimen/dp_56" - android:layout_marginTop="@dimen/dp_26" - android:layout_marginEnd="@dimen/dp_16" - android:orientation="horizontal" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="@+id/home_page_title_tv" - app:layout_constraintTop_toBottomOf="@+id/home_page_title_tv"> - <!--鍏ㄩ儴--> - <include - android:id="@+id/home_page_station_all_ic" - layout="@layout/item_station" /> - - <View - android:layout_width="15.5dp" - android:layout_height="match_parent" /> - <!--鏁呴殰--> - <include - android:id="@+id/home_page_station_fault_ic" - layout="@layout/item_station" /> - - <View - android:layout_width="16dp" - android:layout_height="match_parent" /> - <!--绂荤嚎--> - <include - android:id="@+id/home_page_station_offline_ic" - layout="@layout/item_station" /> - - <View - android:layout_width="15.5dp" - android:layout_height="match_parent" /> - <!--寰呮帴鍏�--> - <include - android:id="@+id/home_page_station_connected_ic" - layout="@layout/item_station" /> - - - </LinearLayout> - <ScrollView android:layout_width="0dp" android:layout_height="0dp" - android:layout_marginStart="@dimen/dp_16" - android:layout_marginEnd="@dimen/dp_16" + android:layout_marginTop="@dimen/dp_26" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/home_page_station_ll"> + app:layout_constraintTop_toBottomOf="@+id/home_page_title_tv"> <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" - android:layout_height="wrap_content"> + android:layout_height="wrap_content" + android:layout_marginStart="@dimen/dp_16" + android:layout_marginEnd="@dimen/dp_16"> + + <LinearLayout + android:id="@+id/home_page_station_ll" + android:layout_width="375dp" + android:layout_height="@dimen/dp_56" + android:orientation="horizontal" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent"> + <!--鍏ㄩ儴--> + <include + android:id="@+id/home_page_station_all_ic" + layout="@layout/item_station" /> + + <View + android:layout_width="15.5dp" + android:layout_height="match_parent" /> + <!--鏁呴殰--> + <include + android:id="@+id/home_page_station_fault_ic" + layout="@layout/item_station" /> + + <View + android:layout_width="16dp" + android:layout_height="match_parent" /> + <!--绂荤嚎--> + <include + android:id="@+id/home_page_station_offline_ic" + layout="@layout/item_station" /> + + <View + android:layout_width="15.5dp" + android:layout_height="match_parent" /> + <!--寰呮帴鍏�--> + <include + android:id="@+id/home_page_station_connected_ic" + layout="@layout/item_station" /> + + + </LinearLayout> <androidx.constraintlayout.widget.ConstraintLayout android:id="@+id/home_page_station_info_cl" @@ -90,7 +89,7 @@ android:layout_height="312dp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent"> + app:layout_constraintTop_toBottomOf="@+id/home_page_station_ll"> <RelativeLayout android:id="@+id/home_page_station_info_rl1" @@ -108,9 +107,9 @@ android:background="@drawable/disc"> <TextView - android:id="@+id/home_page_station_info_rl1_f_text1_tv" - android:layout_width="62dp" - android:layout_height="31.5dp" + android:id="@+id/info_rl1_f_text1_tv" + android:layout_width="56dp" + android:layout_height="wrap_content" android:layout_centerVertical="true" android:gravity="end|center_vertical" android:text="88" @@ -121,10 +120,10 @@ android:id="@+id/home_page_station_info_rl1_f_text2_tv" android:layout_width="9dp" android:layout_height="14.5dp" - android:layout_alignBottom="@+id/home_page_station_info_rl1_f_text1_tv" + android:layout_alignBottom="@+id/info_rl1_f_text1_tv" android:layout_marginStart="2.5dp" android:layout_marginBottom="4.5dp" - android:layout_toEndOf="@+id/home_page_station_info_rl1_f_text1_tv" + android:layout_toEndOf="@+id/info_rl1_f_text1_tv" android:text="%" android:textColor="@color/text_191919" android:textSize="@dimen/text_12" /> @@ -132,7 +131,7 @@ <TextView - android:id="@+id/home_page_station_info_rl1_text1_tv" + android:id="@+id/info_rl1_text1_tv" style="@style/Text20Style" android:layout_width="wrap_content" android:layout_height="@dimen/dp_24" @@ -142,34 +141,34 @@ android:text="33333333" /> <TextView - android:id="@+id/home_page_station_info_rl1_text2_tv" + android:id="@+id/info_rl1_text2_tv" style="@style/Text14Style" android:layout_width="wrap_content" android:layout_height="@dimen/dp_17" - android:layout_below="@+id/home_page_station_info_rl1_text1_tv" - android:layout_alignStart="@+id/home_page_station_info_rl1_text1_tv" + android:layout_below="@+id/info_rl1_text1_tv" + android:layout_alignStart="@+id/info_rl1_text1_tv" android:layout_marginTop="3dp" - android:text="kw.h" /> + android:text="@string/installed_capacity" /> <TextView - android:id="@+id/home_page_station_info_rl1_text3_tv" + android:id="@+id/info_rl1_text3_tv" style="@style/Text20Style" android:layout_width="wrap_content" android:layout_height="@dimen/dp_24" - android:layout_below="@+id/home_page_station_info_rl1_text2_tv" - android:layout_alignStart="@+id/home_page_station_info_rl1_text1_tv" + android:layout_below="@+id/info_rl1_text2_tv" + android:layout_alignStart="@+id/info_rl1_text1_tv" android:layout_marginTop="@dimen/dp_16" android:text="33333" /> <TextView - android:id="@+id/home_page_station_info_rl1_text4_tv" + android:id="@+id/info_rl1_text4_tv" style="@style/Text14Style" android:layout_width="wrap_content" android:layout_height="@dimen/dp_17" - android:layout_below="@+id/home_page_station_info_rl1_text3_tv" - android:layout_alignStart="@+id/home_page_station_info_rl1_text1_tv" + android:layout_below="@+id/info_rl1_text3_tv" + android:layout_alignStart="@+id/info_rl1_text1_tv" android:layout_marginTop="3dp" - android:text="kw.h" /> + android:text="@string/generated_power" /> </RelativeLayout> @@ -195,7 +194,7 @@ android:layout_height="14.5dp" android:layout_marginStart="@dimen/dp_47" android:layout_marginTop="17dp" - android:text="Electricity /kw.h" + android:text="@string/generation" android:textColor="@color/text_191919" android:textSize="@dimen/text_12" /> @@ -248,59 +247,402 @@ </RelativeLayout> </androidx.constraintlayout.widget.ConstraintLayout> - <TextView - android:id="@+id/test1" - android:layout_width="wrap_content" + <androidx.constraintlayout.widget.ConstraintLayout + android:id="@+id/home_page_station_data_cl" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="鐐瑰嚮娴嬭瘯1" - android:textSize="@dimen/text_30" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/home_page_station_info_cl" /> + app:layout_constraintTop_toBottomOf="@+id/home_page_station_info_cl"> - <com.github.AAChartModel.AAChartCore.AAChartCreator.AAChartView - android:id="@+id/AAChartView1" - android:layout_width="0dp" - android:layout_height="300dp" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/test1" /> + <TextView + android:id="@+id/home_page_station_data_title_tv" + android:layout_width="wrap_content" + android:layout_height="18dp" + android:layout_marginTop="@dimen/dp_25" + android:text="@string/energy_generation_statistics" + android:textColor="@color/text_90000000" + android:textSize="@dimen/text_14" + android:textStyle="bold" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + <!--鏃堕棿绫诲瀷--> + <LinearLayout + android:id="@+id/home_page_station_select_time_type_ll" + android:layout_width="match_parent" + android:layout_height="30.5dp" + android:layout_marginTop="@dimen/dp_13" + android:background="@drawable/line_c1c1c1" + android:orientation="horizontal" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/home_page_station_data_title_tv"> - <TextView - android:id="@+id/test2" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="鐐瑰嚮娴嬭瘯2" - android:textSize="@dimen/text_30" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/AAChartView1" /> + <TextView + android:id="@+id/day_tv" + style="@style/Text14Style" + android:layout_width="86dp" + android:layout_height="match_parent" + android:gravity="center" + android:text="@string/day" /> - <com.github.AAChartModel.AAChartCore.AAChartCreator.AAChartView - android:id="@+id/AAChartView2" - android:layout_width="0dp" - android:layout_height="300dp" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/test2" /> + <View + android:id="@+id/v_1" + android:layout_width="1dp" + android:layout_height="match_parent" + android:background="@color/text_C1C1C1" /> - <TextView - android:id="@+id/test3" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="鐐瑰嚮娴嬭瘯3" - android:textSize="@dimen/text_30" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/AAChartView2" /> + <TextView + android:id="@+id/month_tv" + style="@style/Text14Style" + android:layout_width="86dp" + android:layout_height="match_parent" + android:gravity="center" + android:text="@string/month" /> - <com.github.AAChartModel.AAChartCore.AAChartCreator.AAChartView - android:id="@+id/AAChartView3" - android:layout_width="0dp" - android:layout_height="300dp" + <View + android:id="@+id/v_2" + android:layout_width="1dp" + android:layout_height="match_parent" + android:background="@color/text_C1C1C1" /> + + <TextView + android:id="@+id/year_tv" + style="@style/Text14Style" + android:layout_width="86dp" + android:layout_height="match_parent" + android:gravity="center" + android:text="@string/year" /> + + <View + android:id="@+id/v_3" + android:layout_width="1dp" + android:layout_height="match_parent" + android:background="@color/text_C1C1C1" /> + + <TextView + android:id="@+id/lifeCycle_tv" + style="@style/Text14Style" + android:layout_width="86dp" + android:layout_height="match_parent" + android:gravity="center" + android:text="@string/life_cycle" /> + + </LinearLayout> + <!--鏃堕棿鍒囨崲鎺т欢--> + <LinearLayout + android:id="@+id/home_page_station_select_time_ll" + android:layout_width="match_parent" + android:layout_height="30.5dp" + android:layout_marginTop="@dimen/dp_23" + android:gravity="center" + android:orientation="horizontal" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/home_page_station_select_time_type_ll"> + <!--鍔犲ぇ鐐瑰嚮鐑尯--> + <LinearLayout + android:id="@+id/last_step_click_ll" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="horizontal"> + + <View + android:layout_width="@dimen/dp_16" + android:layout_height="match_parent" /> + + <ImageView + android:id="@+id/last_step_iv" + android:layout_width="9dp" + android:layout_height="15dp" + android:scaleType="fitCenter" + android:src="@drawable/last_step" /> + + <View + android:layout_width="@dimen/dp_16" + android:layout_height="match_parent" /> + </LinearLayout> + + <View + android:layout_width="@dimen/dp_16" + android:layout_height="match_parent" /> + + + <TextView + android:id="@+id/year_month_day_tv" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:gravity="center" + android:text="2024/03/07" + android:textColor="@color/text_90000000" + android:textSize="@dimen/text_16" + android:textStyle="bold" /> + + <View + android:layout_width="@dimen/dp_16" + android:layout_height="match_parent" /> + <!--鍔犲ぇ鐐瑰嚮鐑尯--> + <LinearLayout + android:id="@+id/next_step_click_ll" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="horizontal"> + + <View + android:layout_width="@dimen/dp_16" + android:layout_height="match_parent" /> + + <ImageView + android:id="@+id/next_step_iv" + android:layout_width="9dp" + android:layout_height="15dp" + android:scaleType="fitCenter" + android:src="@drawable/next_step" /> + + <View + android:layout_width="@dimen/dp_16" + android:layout_height="match_parent" /> + + </LinearLayout> + + </LinearLayout> + + <RelativeLayout + android:id="@+id/chart_title_rl" + android:layout_width="match_parent" + android:layout_height="@dimen/dp_15" + android:layout_marginTop="@dimen/dp_36" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/home_page_station_select_time_ll"> + + <TextView + android:id="@+id/unit_tv" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:layout_alignParentStart="true" + android:textColor="@color/text_40000000" + android:textSize="@dimen/text_12" /> + + <TextView + android:id="@+id/unit_icon_tv" + android:layout_width="@dimen/dp_11" + android:layout_height="@dimen/dp_11" + android:layout_marginTop="@dimen/dp_3" + android:layout_marginEnd="@dimen/dp_3" + android:layout_toStartOf="@+id/unit_text_tv" + android:background="@drawable/point_38c494" /> + + <TextView + android:id="@+id/unit_text_tv" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:layout_alignParentEnd="true" + android:text="PV power generation" + android:textColor="@color/text_90000000" + android:textSize="@dimen/text_12" /> + + </RelativeLayout> + + <com.github.AAChartModel.AAChartCore.AAChartCreator.AAChartView + android:id="@+id/AAChartView" + android:layout_width="0dp" + android:layout_height="284dp" + android:layout_marginTop="@dimen/dp_18" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/chart_title_rl" /> + </androidx.constraintlayout.widget.ConstraintLayout> + + <androidx.constraintlayout.widget.ConstraintLayout + android:id="@+id/home_page_station_statistics_cl" + android:layout_width="match_parent" + android:layout_height="186dp" + android:layout_marginTop="@dimen/dp_26" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/test3" /> + app:layout_constraintTop_toBottomOf="@+id/home_page_station_data_cl"> + + <TextView + android:id="@+id/social_contribution_title_tv" + android:layout_width="wrap_content" + android:layout_height="17dp" + android:text="@string/social_contribution" + android:textColor="@color/text_90000000" + android:textSize="@dimen/text_14" + android:textStyle="bold" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + <RelativeLayout + android:id="@+id/social_contribution_1_rl" + android:layout_width="@dimen/dp_104" + android:layout_height="@dimen/dp_126" + android:layout_marginTop="@dimen/dp_13" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/social_contribution_title_tv"> + + <ImageView + android:layout_width="match_parent" + android:layout_height="match_parent" + android:scaleType="fitCenter" + android:src="@drawable/social_contribution_1" /> + + <TextView + android:id="@+id/social_contribution_data_1_tv" + android:layout_width="wrap_content" + android:layout_height="22dp" + android:layout_alignParentStart="true" + android:layout_alignParentTop="true" + android:layout_marginStart="@dimen/dp_10" + android:layout_marginTop="@dimen/dp_16" + android:text="13.14" + android:textColor="@color/text_90000000" + android:textSize="@dimen/text_18" + android:textStyle="bold" /> + + <TextView + android:id="@+id/social_contribution_unit_1_tv" + android:layout_width="wrap_content" + android:layout_height="15dp" + android:layout_alignBottom="@+id/social_contribution_data_1_tv" + android:layout_marginStart="@dimen/dp_2" + android:layout_toEndOf="@+id/social_contribution_data_1_tv" + android:text="(T)" + android:textColor="@color/text_90000000" + android:textSize="@dimen/text_12" + + + /> + + <TextView + android:id="@+id/social_contribution_des_1_tv" + android:layout_width="wrap_content" + android:layout_height="15dp" + android:layout_alignParentStart="true" + android:layout_alignParentTop="true" + android:layout_marginStart="@dimen/dp_10" + android:layout_marginTop="@dimen/dp_35" + android:text="ssss" + android:textColor="@color/text_40000000" + android:textSize="@dimen/text_12" /> + + + </RelativeLayout> + + <RelativeLayout + android:id="@+id/social_contribution_2_rl" + android:layout_width="@dimen/dp_104" + android:layout_height="@dimen/dp_126" + android:layout_marginStart="@dimen/dp_16" + android:layout_marginTop="@dimen/dp_13" + app:layout_constraintStart_toEndOf="@+id/social_contribution_1_rl" + app:layout_constraintTop_toBottomOf="@+id/social_contribution_title_tv"> + + <ImageView + android:layout_width="match_parent" + android:layout_height="match_parent" + android:scaleType="fitCenter" + android:src="@drawable/social_contribution_2" /> + + <TextView + android:id="@+id/social_contribution_data_2_tv" + android:layout_width="wrap_content" + android:layout_height="22dp" + android:layout_alignParentStart="true" + android:layout_alignParentTop="true" + android:layout_marginStart="@dimen/dp_10" + android:layout_marginTop="@dimen/dp_16" + android:text="13.14" + android:textColor="@color/text_90000000" + android:textSize="@dimen/text_18" + android:textStyle="bold" /> + + <TextView + android:id="@+id/social_contribution_unit_2_tv" + android:layout_width="wrap_content" + android:layout_height="15dp" + android:layout_alignBottom="@+id/social_contribution_data_2_tv" + android:layout_marginStart="@dimen/dp_2" + android:layout_toEndOf="@+id/social_contribution_data_2_tv" + android:text="(T)" + android:textColor="@color/text_90000000" + android:textSize="@dimen/text_12" + + /> + + <TextView + android:id="@+id/social_contribution_des_2_tv" + android:layout_width="wrap_content" + android:layout_height="15dp" + android:layout_alignParentStart="true" + android:layout_alignParentTop="true" + android:layout_marginStart="@dimen/dp_10" + android:layout_marginTop="@dimen/dp_35" + android:text="ssss" + android:textColor="@color/text_40000000" + android:textSize="@dimen/text_12" /> + + + </RelativeLayout> + + <RelativeLayout + android:id="@+id/social_contribution_3_rl" + android:layout_width="@dimen/dp_104" + android:layout_height="@dimen/dp_126" + android:layout_marginStart="@dimen/dp_16" + android:layout_marginTop="@dimen/dp_13" + app:layout_constraintStart_toEndOf="@+id/social_contribution_2_rl" + app:layout_constraintTop_toBottomOf="@+id/social_contribution_title_tv"> + + <ImageView + android:layout_width="match_parent" + android:layout_height="match_parent" + android:scaleType="fitCenter" + android:src="@drawable/social_contribution_3" /> + + <TextView + android:id="@+id/social_contribution_data_3_tv" + android:layout_width="wrap_content" + android:layout_height="22dp" + android:layout_alignParentTop="true" + android:layout_marginStart="@dimen/dp_10" + android:layout_marginTop="@dimen/dp_16" + android:text="13.14" + android:textColor="@color/text_90000000" + android:textSize="@dimen/text_18" + android:textStyle="bold" /> + + <TextView + android:id="@+id/social_contribution_unit_3_tv" + android:layout_width="wrap_content" + android:layout_height="15dp" + android:layout_alignBottom="@+id/social_contribution_data_3_tv" + android:layout_marginStart="@dimen/dp_2" + android:layout_toEndOf="@+id/social_contribution_data_3_tv" + android:text="(T)" + android:textColor="@color/text_90000000" + android:textSize="@dimen/text_12" + + /> + + <TextView + android:id="@+id/social_contribution_des_3_tv" + android:layout_width="wrap_content" + android:layout_height="15dp" + android:layout_alignParentStart="true" + android:layout_alignParentTop="true" + android:layout_marginStart="@dimen/dp_10" + android:layout_marginTop="@dimen/dp_35" + android:text="ssss" + android:textColor="@color/text_40000000" + android:textSize="@dimen/text_12" /> + + + </RelativeLayout> + + </androidx.constraintlayout.widget.ConstraintLayout> + </androidx.constraintlayout.widget.ConstraintLayout> -- Gitblit v1.8.0