From c624adada781dc1f38f5c91e719f0712d984b846 Mon Sep 17 00:00:00 2001
From: mac <user@users-MacBook-Pro.local>
Date: 星期一, 29 四月 2024 18:53:07 +0800
Subject: [PATCH] 2024年04月29日18:52:56
---
app/src/main/res/drawable/state_b9b9b9.xml | 4
/dev/null | 93 ---------------
app/src/main/res/layout/fragment_house_list.xml | 12 +
app/src/main/res/layout/swipe_right_layout.xml | 6
app/src/main/res/drawable/state_e34343.xml | 4
app/src/main/java/com/hdl/photovoltaic/ui/adapter/HouseInfoAdapter.java | 12 +-
app/src/main/res/drawable/state_ffb300.xml | 4
app/src/main/res/layout/item_plant_details.xml | 214 +++++++++++++++++++++++++++++++++++
app/src/main/res/drawable/state_06b92a.xml | 4
app/src/main/res/drawable/ffffff_13.xml | 5
10 files changed, 244 insertions(+), 114 deletions(-)
diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/adapter/HouseInfoAdapter.java b/app/src/main/java/com/hdl/photovoltaic/ui/adapter/HouseInfoAdapter.java
index f8fa28e..d1a4ce8 100644
--- a/app/src/main/java/com/hdl/photovoltaic/ui/adapter/HouseInfoAdapter.java
+++ b/app/src/main/java/com/hdl/photovoltaic/ui/adapter/HouseInfoAdapter.java
@@ -42,7 +42,7 @@
@NonNull
@Override
public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
- View contentItem = LayoutInflater.from(parent.getContext()).inflate(R.layout.frgment_house_list_line, parent, false);
+ View contentItem = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_plant_details, parent, false);
return new MyViewHolder(contentItem);
}
@@ -73,7 +73,7 @@
holder.powerTv.setText(power);
holder.item_parent_rl.setTag(position);
setTextViewStyle(holder.stateTv, houseIdBean.getPowerStationStatus());
- GlideUtils.getRoundedCornersImage(mContext, houseIdBean.getPowerStationImage(), holder.homeIconIv, new RoundedCorners(4), false);
+ GlideUtils.getRoundedCornersImage(mContext, houseIdBean.getPowerStationImage(), holder.homeIconIv, new RoundedCorners(6), false);
HdlLogLogic.print("--->鐢电珯鍚嶇О:" + houseIdBean.getHomeName() + "--->鍥剧墖url:" + houseIdBean.getPowerStationImage(), false);
holder.item_parent_rl.setOnClickListener(new View.OnClickListener() {
@@ -201,10 +201,10 @@
public MyViewHolder(@NonNull View itemView) {
super(itemView);
- homeIconIv = itemView.findViewById(R.id.fragment_house_list_line_left_iv);
- homeNameTv = itemView.findViewById(R.id.fragment_house_list_line_name_tv);
- capacityTv = itemView.findViewById(R.id.fragment_house_list_line_capacity_tv);
- powerTv = itemView.findViewById(R.id.fragment_house_list_line_power_tv);
+ homeIconIv = itemView.findViewById(R.id.plant_details_image_iv);
+ homeNameTv = itemView.findViewById(R.id.plant_details_name_tv);
+ capacityTv = itemView.findViewById(R.id.plant_details_capacity_tv);
+ powerTv = itemView.findViewById(R.id.power_type_tv);
stateTv = itemView.findViewById(R.id.fragment_house_list_line_state_tv);
item_parent_rl = itemView.findViewById(R.id.item_parent_rl);
move_home_iv = itemView.findViewById(R.id.move_home_iv);
diff --git a/app/src/main/res/drawable/ffffff_13.xml b/app/src/main/res/drawable/ffffff_13.xml
new file mode 100644
index 0000000..fd9e1af
--- /dev/null
+++ b/app/src/main/res/drawable/ffffff_13.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+ <corners android:radius="@dimen/dp_13" />
+ <solid android:color="@color/text_FFFFFFFF" />
+</shape>
\ No newline at end of file
diff --git a/app/src/main/res/drawable/state_06b92a.xml b/app/src/main/res/drawable/state_06b92a.xml
index d4505e4..441aaad 100644
--- a/app/src/main/res/drawable/state_06b92a.xml
+++ b/app/src/main/res/drawable/state_06b92a.xml
@@ -2,6 +2,6 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/text_06B92A" />
<corners
- android:bottomLeftRadius="@dimen/dp_4"
- android:topRightRadius="@dimen/dp_4" />
+ android:bottomLeftRadius="@dimen/dp_13"
+ android:topRightRadius="@dimen/dp_13" />
</shape>
\ No newline at end of file
diff --git a/app/src/main/res/drawable/state_b9b9b9.xml b/app/src/main/res/drawable/state_b9b9b9.xml
index f5f4a8b..629430a 100644
--- a/app/src/main/res/drawable/state_b9b9b9.xml
+++ b/app/src/main/res/drawable/state_b9b9b9.xml
@@ -2,6 +2,6 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/text_B9B9B9" />
<corners
- android:bottomLeftRadius="@dimen/dp_4"
- android:topRightRadius="@dimen/dp_4" />
+ android:bottomLeftRadius="@dimen/dp_13"
+ android:topRightRadius="@dimen/dp_13" />
</shape>
\ No newline at end of file
diff --git a/app/src/main/res/drawable/state_e34343.xml b/app/src/main/res/drawable/state_e34343.xml
index ec2b056..9b7e68c 100644
--- a/app/src/main/res/drawable/state_e34343.xml
+++ b/app/src/main/res/drawable/state_e34343.xml
@@ -2,6 +2,6 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/text_E34343" />
<corners
- android:bottomLeftRadius="@dimen/dp_4"
- android:topRightRadius="@dimen/dp_4" />
+ android:bottomLeftRadius="@dimen/dp_13"
+ android:topRightRadius="@dimen/dp_13" />
</shape>
\ No newline at end of file
diff --git a/app/src/main/res/drawable/state_ffb300.xml b/app/src/main/res/drawable/state_ffb300.xml
index 2f120fb..81321b9 100644
--- a/app/src/main/res/drawable/state_ffb300.xml
+++ b/app/src/main/res/drawable/state_ffb300.xml
@@ -2,6 +2,6 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/text_FFB300" />
<corners
- android:bottomLeftRadius="@dimen/dp_4"
- android:topRightRadius="@dimen/dp_4" />
+ android:bottomLeftRadius="@dimen/dp_13"
+ android:topRightRadius="@dimen/dp_13" />
</shape>
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_house_list.xml b/app/src/main/res/layout/fragment_house_list.xml
index 5a1b9f9..b3850b2 100644
--- a/app/src/main/res/layout/fragment_house_list.xml
+++ b/app/src/main/res/layout/fragment_house_list.xml
@@ -9,7 +9,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/power_station_label_top_cl"
android:layout_width="match_parent"
- android:layout_height="@dimen/dp_200"
+ android:layout_height="205dp"
android:layout_marginTop="@dimen/dp_44"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@@ -31,6 +31,7 @@
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_centerVertical="true"
+ android:gravity="center_vertical"
android:text="Power Station"
android:textColor="@color/text_90000000"
android:textSize="@dimen/text_20"
@@ -42,9 +43,10 @@
android:layout_height="match_parent"
android:layout_centerVertical="true"
android:layout_marginStart="@dimen/dp_21"
+ android:layout_marginEnd="@dimen/dp_4"
android:layout_toStartOf="@+id/edit_iv"
android:layout_toEndOf="@+id/power_station_label"
- android:gravity=""
+ android:gravity="start|center_vertical"
android:text="Equipment"
android:textColor="@color/text_40000000"
android:textSize="@dimen/text_16"
@@ -329,8 +331,9 @@
<ImageView
android:id="@+id/station_power_iv"
- android:layout_width="@dimen/dp_18"
- android:layout_height="@dimen/dp_18"
+ android:layout_width="wrap_content"
+ android:layout_height="15dp"
+ android:layout_marginStart="-8dp"
android:layout_toEndOf="@+id/station_power_tv"
android:src="@drawable/ascending_sort" />
</RelativeLayout>
@@ -401,6 +404,7 @@
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">
<androidx.recyclerview.widget.RecyclerView
diff --git a/app/src/main/res/layout/frgment_house_list_line.xml b/app/src/main/res/layout/frgment_house_list_line.xml
deleted file mode 100644
index b238670..0000000
--- a/app/src/main/res/layout/frgment_house_list_line.xml
+++ /dev/null
@@ -1,93 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<com.hdl.photovoltaic.widget.SwipeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/item_parent_swipeLayout"
- android:layout_width="match_parent"
- android:layout_height="wrap_content">
-
- <include
- android:id="@+id/swipe_layout_il"
- layout="@layout/swipe_right_layout" />
-
- <RelativeLayout
- android:id="@+id/item_parent_rl"
- android:layout_width="match_parent"
- android:layout_height="142dp"
- android:background="@color/text_F9FAFB">
-
- <RelativeLayout
- android:id="@+id/fragment_house_list_line_parent_rl"
- android:layout_width="0dp"
- android:layout_height="130dp"
- android:layout_alignParentStart="true"
- android:layout_alignParentEnd="true"
- android:layout_marginStart="@dimen/dp_20"
- android:layout_marginTop="@dimen/dp_12"
- android:layout_marginEnd="@dimen/dp_20"
- android:background="@drawable/house_list_line_parent_bg">
-
- <ImageView
- android:id="@+id/fragment_house_list_line_left_iv"
- android:layout_width="113dp"
- android:layout_height="130dp"
- android:background="@drawable/default_user"
- android:scaleType="centerCrop" />
-
- <TextView
- android:id="@+id/fragment_house_list_line_name_tv"
- android:layout_width="170dp"
- android:layout_height="@dimen/dp_23"
- android:layout_marginStart="@dimen/dp_15"
- android:layout_marginTop="@dimen/dp_28"
- android:layout_toEndOf="@+id/fragment_house_list_line_left_iv"
- android:ellipsize="end"
- android:gravity="center_vertical|start"
- android:singleLine="true"
- android:text="@string/power_station"
- android:textColor="@color/text_90000000"
- android:textSize="@dimen/text_16" />
-
- <TextView
- android:id="@+id/fragment_house_list_line_capacity_tv"
- android:layout_width="wrap_content"
- android:layout_height="@dimen/dp_17"
- android:layout_below="@+id/fragment_house_list_line_name_tv"
- android:layout_alignStart="@+id/fragment_house_list_line_name_tv"
- android:layout_marginTop="@dimen/dp_13"
- android:gravity="center_vertical"
- android:text="@string/my_power_station_installed_capacity"
- android:textColor="@color/text_40000000"
- android:textSize="@dimen/text_12" />
-
- <TextView
- android:id="@+id/fragment_house_list_line_power_tv"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@+id/fragment_house_list_line_capacity_tv"
- android:layout_alignStart="@+id/fragment_house_list_line_capacity_tv"
- android:layout_marginTop="@dimen/dp_13"
- android:gravity="center_vertical"
- android:text="@string/power_station_generated_power"
- android:textColor="@color/text_40000000"
- android:textSize="@dimen/text_12" />
-
- <TextView
- android:id="@+id/fragment_house_list_line_state_tv"
- android:layout_width="@dimen/dp_48"
- android:layout_height="@dimen/dp_33"
- android:layout_alignParentTop="true"
- android:layout_alignParentEnd="true"
- android:background="@drawable/state_ffb300"
- android:gravity="center"
- android:text="@string/my_power_station_connecting"
- android:textColor="@color/text_FFFFFFFF"
- android:textSize="@dimen/text_12" />
-
-
- </RelativeLayout>
-
-
- </RelativeLayout>
-
-</com.hdl.photovoltaic.widget.SwipeLayout>
-
diff --git a/app/src/main/res/layout/item_plant_details.xml b/app/src/main/res/layout/item_plant_details.xml
new file mode 100644
index 0000000..9c91e74
--- /dev/null
+++ b/app/src/main/res/layout/item_plant_details.xml
@@ -0,0 +1,214 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<com.hdl.photovoltaic.widget.SwipeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/item_parent_swipeLayout"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+
+ <include
+ android:id="@+id/swipe_layout_il"
+ layout="@layout/swipe_right_layout" />
+
+ <RelativeLayout
+ android:id="@+id/item_parent_rl"
+ android:layout_width="match_parent"
+ android:layout_height="164dp">
+
+ <RelativeLayout
+ android:id="@+id/plant_details_info_rl"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_marginStart="@dimen/dp_16"
+ android:layout_marginTop="@dimen/dp_16"
+ android:layout_marginEnd="@dimen/dp_16"
+ android:background="@drawable/ffffff_13">
+
+ <ImageView
+ android:id="@+id/plant_details_image_iv"
+ android:layout_width="44dp"
+ android:layout_height="42dp"
+ android:layout_marginStart="@dimen/dp_16"
+ android:layout_marginTop="@dimen/dp_13"
+ android:background="@drawable/default_user"
+ android:scaleType="centerCrop" />
+
+ <TextView
+ android:id="@+id/plant_details_name_tv"
+ android:layout_width="170dp"
+ android:layout_height="@dimen/dp_19"
+ android:layout_marginStart="@dimen/dp_11"
+ android:layout_marginTop="@dimen/dp_15"
+ android:layout_toEndOf="@+id/plant_details_image_iv"
+ android:ellipsize="end"
+ android:gravity="center_vertical|start"
+ android:singleLine="true"
+ android:text="@string/power_station"
+ android:textColor="@color/text_90000000"
+ android:textSize="@dimen/text_16"
+ android:textStyle="bold" />
+
+ <TextView
+ android:id="@+id/plant_details_capacity_tv"
+ android:layout_width="wrap_content"
+ android:layout_height="@dimen/dp_17"
+ android:layout_below="@+id/plant_details_name_tv"
+ android:layout_alignStart="@+id/plant_details_name_tv"
+ android:layout_marginTop="@dimen/dp_3"
+ android:gravity="center_vertical"
+ android:text="@string/installed_capacity"
+ android:textColor="@color/text_40000000"
+ android:textSize="@dimen/text_12" />
+
+ <LinearLayout
+ android:id="@+id/screening_condition_ll"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/dp_36"
+ android:layout_below="@+id/plant_details_image_iv"
+ android:layout_marginStart="@dimen/dp_16"
+ android:layout_marginTop="@dimen/dp_17"
+ android:orientation="horizontal">
+
+ <LinearLayout
+ android:id="@+id/power_ll"
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:orientation="vertical">
+
+ <TextView
+ android:id="@+id/power_value_tv"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/dp_18"
+ android:gravity="center"
+ android:text="99"
+ android:textColor="@color/text_90000000"
+ android:textSize="@dimen/text_15"
+ android:textStyle="bold" />
+
+ <TextView
+ android:id="@+id/power_type_tv"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/dp_15"
+ android:layout_marginTop="3dp"
+ android:gravity="center"
+ android:text="@string/generated_power"
+ android:textColor="@color/text_40000000"
+ android:textSize="@dimen/text_12" />
+
+ </LinearLayout>
+
+ <LinearLayout
+ android:id="@+id/day_ll"
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:orientation="vertical">
+
+ <TextView
+ android:id="@+id/day_value_tv"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/dp_18"
+ android:gravity="center"
+ android:text="99"
+ android:textColor="@color/text_90000000"
+ android:textSize="@dimen/text_15"
+ android:textStyle="bold" />
+
+ <TextView
+ android:id="@+id/day_type_tv"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/dp_15"
+ android:layout_marginTop="3dp"
+ android:gravity="center"
+ android:text="@string/day_power_generation"
+ android:textColor="@color/text_40000000"
+ android:textSize="@dimen/text_12" />
+
+ </LinearLayout>
+
+ <LinearLayout
+ android:id="@+id/month_ll"
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:orientation="vertical">
+
+ <TextView
+ android:id="@+id/month_value_tv"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/dp_18"
+ android:gravity="center"
+ android:text="99"
+ android:textColor="@color/text_90000000"
+ android:textSize="@dimen/text_15"
+ android:textStyle="bold" />
+
+ <TextView
+ android:id="@+id/month_type_tv"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/dp_15"
+ android:layout_marginTop="3dp"
+ android:gravity="center"
+ android:text="@string/month_power_generation"
+ android:textColor="@color/text_40000000"
+ android:textSize="@dimen/text_12" />
+
+ </LinearLayout>
+
+
+ </LinearLayout>
+
+ <View
+ android:id="@+id/line"
+ android:layout_width="match_parent"
+ android:layout_height="1dp"
+ android:layout_below="@+id/screening_condition_ll"
+ android:layout_marginStart="@dimen/dp_17"
+ android:layout_marginTop="@dimen/dp_8"
+ android:layout_marginEnd="@dimen/dp_16"
+ android:background="@color/text_E1E1E1" />
+
+ <ImageView
+ android:id="@+id/plant_details_location_iv"
+ android:layout_width="@dimen/dp_19"
+ android:layout_height="@dimen/dp_19"
+ android:layout_below="@+id/line"
+ android:layout_marginStart="@dimen/dp_11"
+ android:layout_marginTop="@dimen/dp_7"
+ android:src="@drawable/location" />
+
+ <TextView
+ android:id="@+id/plant_details_location_tv"
+ android:layout_width="290dp"
+ android:layout_height="@dimen/dp_19"
+ android:layout_below="@+id/line"
+ android:layout_marginStart="@dimen/dp_3"
+ android:layout_marginTop="@dimen/dp_8"
+ android:layout_toEndOf="@+id/plant_details_location_iv"
+ android:ellipsize="end"
+ android:gravity="center_vertical|start"
+ android:singleLine="true"
+ android:text="@string/power_station"
+ android:textColor="@color/text_40000000"
+ android:textSize="@dimen/text_12" />
+
+ <TextView
+ android:id="@+id/fragment_house_list_line_state_tv"
+ android:layout_width="69dp"
+ android:layout_height="@dimen/dp_33"
+ android:layout_alignParentTop="true"
+ android:layout_alignParentEnd="true"
+ android:background="@drawable/state_ffb300"
+ android:gravity="center"
+ android:text="@string/my_power_station_connecting"
+ android:textColor="@color/text_FFFFFFFF"
+ android:textSize="@dimen/text_12" />
+
+
+ </RelativeLayout>
+
+
+ </RelativeLayout>
+
+</com.hdl.photovoltaic.widget.SwipeLayout>
+
diff --git a/app/src/main/res/layout/swipe_right_layout.xml b/app/src/main/res/layout/swipe_right_layout.xml
index 9e67d01..73ebdbb 100644
--- a/app/src/main/res/layout/swipe_right_layout.xml
+++ b/app/src/main/res/layout/swipe_right_layout.xml
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="66dp"
- android:layout_height="142dp"
+ android:layout_height="164dp"
android:layout_marginTop="@dimen/dp_12"
android:orientation="vertical">
<View
android:layout_width="wrap_content"
- android:layout_height="@dimen/dp_19" />
+ android:layout_height="@dimen/dp_24" />
<ImageView
android:id="@+id/move_home_iv"
@@ -17,7 +17,7 @@
<View
android:layout_width="wrap_content"
- android:layout_height="@dimen/dp_16" />
+ android:layout_height="@dimen/dp_32" />
<ImageView
android:id="@+id/del_home_iv"
--
Gitblit v1.8.0