mac
2024-11-05 e58e66125acccbd9b79573a520f9a6140bc47506
2024年11月05日13:23:06

优化UI
5个文件已修改
231 ■■■■ 已修改文件
app/src/main/java/com/hdl/photovoltaic/ui/newC/MessageCenterList.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/uni/HDLUniMP.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/layout/activity_message_center_list.xml 83 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/layout/fragment_house_list.xml 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/layout/fragment_message.xml 54 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/ui/newC/MessageCenterList.java
@@ -342,7 +342,7 @@
        viewBinding.messageContentRl.setLayoutManager(mLayoutManager);
        viewBinding.messageContentRl.setAdapter(messageCenterListAdapter);
        messageCenterListAdapter.setList(mList);
        this.nullDataUpdateUi();
//        this.nullDataUpdateUi();
    }
    private void initData() {
app/src/main/java/com/hdl/photovoltaic/uni/HDLUniMP.java
@@ -42,6 +42,7 @@
    public final static String UNI_EVENT_REPLY_DEVICE_MODEL = "uni_device_model";//设备模块(大类)
    public final static String UNI_EVENT_REPLY_DEVICE_LIST = "list";//本地逆变器设备列表
    public final static String UNI_EVENT_REPLY_DEVICE_NET_LIST = "net_list";//网络逆变器设备列表
    public final static String UNI_EVENT_REPLY_DEVICE_CLOUD_LIST = "cloud_list";//获取云端逆变器设备列表
    public final static String UNI_EVENT_REPLY_DEVICE_CHILD_LIST = "child_list";//逆变器【下挂】设备列表
    public final static String UNI_EVENT_REPLY_DEVICE_ADD = "add";//设备添加
    public final static String UNI_EVENT_REPLY_DEVICE_ADD_All = "add_all";//添加多个设备
app/src/main/res/layout/activity_message_center_list.xml
@@ -28,11 +28,11 @@
            android:layout_marginEnd="@dimen/dp_16"
            android:orientation="horizontal">
            <!--全部设备-->
            <androidx.constraintlayout.widget.ConstraintLayout
            <LinearLayout
                android:id="@+id/message_tab_all_device_cl"
                android:layout_width="0dp"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_weight="1">
                android:gravity="center">
                <TextView
                    android:id="@+id/all_device_title_tv"
@@ -56,13 +56,18 @@
                    app:layout_constraintTop_toTopOf="@+id/all_device_title_tv" />
            </androidx.constraintlayout.widget.ConstraintLayout>
            <!--全部等级-->
            <androidx.constraintlayout.widget.ConstraintLayout
                android:id="@+id/message_tab_all_grade_cl"
            </LinearLayout>
            <View
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1">
                android:layout_weight="1" />
            <!--全部等级-->
            <LinearLayout
                android:id="@+id/message_tab_all_grade_cl"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:gravity="center">
                <TextView
                    android:id="@+id/all_grade_title_tv"
@@ -87,13 +92,18 @@
                    app:layout_constraintTop_toTopOf="@+id/all_grade_title_tv" />
            </androidx.constraintlayout.widget.ConstraintLayout>
            <!--全部时间-->
            <androidx.constraintlayout.widget.ConstraintLayout
                android:id="@+id/message_tab_all_time_cl"
            </LinearLayout>
            <View
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1">
                android:layout_weight="1" />
            <!--全部时间-->
            <LinearLayout
                android:id="@+id/message_tab_all_time_cl"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:gravity="center">
                <TextView
                    android:id="@+id/all_time_title_tv"
@@ -117,7 +127,7 @@
                    app:layout_constraintTop_toTopOf="@+id/all_time_title_tv" />
            </androidx.constraintlayout.widget.ConstraintLayout>
            </LinearLayout>
        </LinearLayout>
    </RelativeLayout>
@@ -150,7 +160,7 @@
        app:layout_constraintTop_toBottomOf="@+id/message_rl" />
    <androidx.constraintlayout.widget.ConstraintLayout
    <LinearLayout
        android:id="@+id/message_bottom_cl"
        android:layout_width="match_parent"
        android:layout_height="64dp"
@@ -162,16 +172,15 @@
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="@dimen/dp_47"
            android:orientation="horizontal"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent">
            android:orientation="horizontal">
            <!--设备报警-->
            <androidx.constraintlayout.widget.ConstraintLayout
            <LinearLayout
                android:id="@+id/message_bottom_alarm_device_cl"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1">
                android:layout_weight="1"
                android:gravity="center"
                android:orientation="vertical">
                <TextView
                    android:id="@+id/message_bottom_alarm_device_title_tv"
@@ -182,29 +191,25 @@
                    android:text="@string/alarm_device"
                    android:textColor="@color/text_191919"
                    android:textSize="@dimen/text_16"
                    android:textStyle="bold"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />
                    android:textStyle="bold" />
                <View
                    android:id="@+id/message_bottom_alarm_device_line_v"
                    android:layout_width="18dp"
                    android:layout_height="3dp"
                    android:layout_marginTop="4.5dp"
                    android:background="@drawable/line_view"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintEnd_toEndOf="@+id/message_bottom_alarm_device_title_tv"
                    app:layout_constraintStart_toStartOf="@+id/message_bottom_alarm_device_title_tv" />
                    android:background="@drawable/line_view" />
            </androidx.constraintlayout.widget.ConstraintLayout>
            </LinearLayout>
            <!--报警记录-->
            <androidx.constraintlayout.widget.ConstraintLayout
            <LinearLayout
                android:id="@+id/message_bottom_alarm_record_cl"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1">
                android:layout_weight="1"
                android:gravity="center"
                android:orientation="vertical">
                <TextView
                    android:id="@+id/message_bottom_alarm_record_title_tv"
@@ -214,26 +219,20 @@
                    android:gravity="center"
                    android:text="@string/alarm_record"
                    android:textColor="@color/text_191919"
                    android:textSize="@dimen/text_16"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />
                    android:textSize="@dimen/text_16" />
                <View
                    android:id="@+id/message_bottom_alarm_record_line_v"
                    android:layout_width="@dimen/dp_18"
                    android:layout_height="3dp"
                    android:layout_marginTop="4.5dp"
                    android:background="@drawable/line_view"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintEnd_toEndOf="@+id/message_bottom_alarm_record_title_tv"
                    app:layout_constraintStart_toStartOf="@+id/message_bottom_alarm_record_title_tv" />
                    android:background="@drawable/line_view" />
            </androidx.constraintlayout.widget.ConstraintLayout>
            </LinearLayout>
        </LinearLayout>
    </androidx.constraintlayout.widget.ConstraintLayout>
    </LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
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>
    </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" />
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/device_label_top_cl"
            />
    </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
app/src/main/res/layout/fragment_message.xml
@@ -54,11 +54,12 @@
    </RelativeLayout>
    <androidx.constraintlayout.widget.ConstraintLayout
    <LinearLayout
        android:id="@+id/message_cl"
        android:layout_width="match_parent"
        android:layout_height="98dp"
        android:layout_marginTop="@dimen/dp_13"
        android:orientation="vertical"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/message_rl">
@@ -105,30 +106,17 @@
        </RelativeLayout>
        <!--条件筛选-->
        <RelativeLayout
            android:id="@+id/message_condition_screening_rl"
            android:layout_width="0dp"
            android:layout_height="@dimen/dp_62"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/message_search_cl">
            <LinearLayout
                android:id="@+id/message_tab_ll"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
            android:layout_height="@dimen/dp_62"
                android:layout_marginStart="@dimen/dp_16"
                android:layout_marginEnd="@dimen/dp_16"
                android:orientation="horizontal">
                <!--全部设备-->
                <androidx.constraintlayout.widget.ConstraintLayout
                    android:id="@+id/message_tab_all_device_cl"
                    android:layout_width="0dp"
                    android:layout_height="match_parent"
                    android:layout_weight="1">
                    <LinearLayout
                        android:layout_width="match_parent"
                android:id="@+id/message_tab_all_device_cl"
                android:layout_width="wrap_content"
                        android:layout_height="match_parent"
                        android:gravity="center_vertical"
                        android:orientation="horizontal">
@@ -154,17 +142,14 @@
                    </LinearLayout>
                </androidx.constraintlayout.widget.ConstraintLayout>
                <!--全部等级-->
                <androidx.constraintlayout.widget.ConstraintLayout
                    android:id="@+id/message_tab_all_grade_cl"
            <View
                    android:layout_width="0dp"
                    android:layout_height="match_parent"
                    android:layout_weight="1">
                android:layout_weight="1" />
            <!--全部等级-->
                    <LinearLayout
                        android:layout_width="match_parent"
                android:id="@+id/message_tab_all_grade_cl"
                android:layout_width="wrap_content"
                        android:layout_height="match_parent"
                        android:gravity="center"
                        android:orientation="horizontal">
@@ -189,17 +174,14 @@
                            android:background="@drawable/down" />
                    </LinearLayout>
                </androidx.constraintlayout.widget.ConstraintLayout>
                <!--全部时间-->
                <androidx.constraintlayout.widget.ConstraintLayout
                    android:id="@+id/message_tab_all_time_cl"
            <View
                    android:layout_width="0dp"
                    android:layout_height="match_parent"
                    android:layout_weight="1">
                android:layout_weight="1" />
            <!--全部时间-->
                    <LinearLayout
                        android:layout_width="match_parent"
                android:id="@+id/message_tab_all_time_cl"
                android:layout_width="wrap_content"
                        android:layout_height="match_parent"
                        android:gravity="center_vertical|end"
                        android:orientation="horizontal">
@@ -222,13 +204,9 @@
                            android:layout_height="@dimen/dp_10"
                            android:background="@drawable/down" />
                    </LinearLayout>
                </androidx.constraintlayout.widget.ConstraintLayout>
            </LinearLayout>
        </RelativeLayout>
    </androidx.constraintlayout.widget.ConstraintLayout>
    </LinearLayout>
    <androidx.swiperefreshlayout.widget.SwipeRefreshLayout