From 9d50ebeec9b481d3a32960165d64fb73f5b9adc8 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期三, 02 四月 2025 18:30:21 +0800
Subject: [PATCH] 2025年04月02日18:24:17
---
app/src/main/java/com/hdl/photovoltaic/ui/CPowerStationActivity.java | 2
app/src/main/java/com/hdl/photovoltaic/enums/DeliverStatus.java | 15 +++
app/src/main/java/com/hdl/photovoltaic/other/HdlResidenceLogic.java | 45 ++++++--
app/src/main/java/com/hdl/photovoltaic/ui/newC/PowerStationsListEdit.java | 93 ++++++++++++++++-
app/src/main/java/com/hdl/photovoltaic/ui/adapter/HouseInfoAdapter.java | 90 +++++++++++++++--
app/src/main/res/layout/item_plant_details.xml | 40 ++++++-
6 files changed, 241 insertions(+), 44 deletions(-)
diff --git a/app/src/main/java/com/hdl/photovoltaic/enums/DeliverStatus.java b/app/src/main/java/com/hdl/photovoltaic/enums/DeliverStatus.java
new file mode 100644
index 0000000..cdcbfd3
--- /dev/null
+++ b/app/src/main/java/com/hdl/photovoltaic/enums/DeliverStatus.java
@@ -0,0 +1,15 @@
+package com.hdl.photovoltaic.enums;
+
+/**
+ * 鐢电珯鐨勮皟璇曠姸鎬�
+ */
+public @interface DeliverStatus {
+ /**
+ * 宸蹭氦浠�
+ */
+ String PAID = "PAID";
+ /**
+ * 鏈氦浠�
+ */
+ String UNDELIVERED = "UNDELIVERED";//鏈氦浠�
+}
diff --git a/app/src/main/java/com/hdl/photovoltaic/other/HdlResidenceLogic.java b/app/src/main/java/com/hdl/photovoltaic/other/HdlResidenceLogic.java
index 4080f22..0c8f3ff 100644
--- a/app/src/main/java/com/hdl/photovoltaic/other/HdlResidenceLogic.java
+++ b/app/src/main/java/com/hdl/photovoltaic/other/HdlResidenceLogic.java
@@ -86,6 +86,33 @@
return mHouseIdList;
}
+ /**
+ * 璁剧疆鍒楄〃鏁版嵁
+ *
+ * @param list 鏂板垪琛�
+ * @param isClear 鏄惁娓呴櫎鏃ф暟鎹�,true琛ㄧず娓呴櫎,鍚﹀垯涓嶆竻闄�;
+ */
+ public void setHouseIdList(List<HouseIdBean> list, boolean isClear) {
+ if (list == null || list.size() == 0) {
+ return;
+ }
+ if (isClear) {
+ this.clearHouseList();
+ }
+ if (this.mHouseIdList.size() == 0) {
+ this.mHouseIdList.addAll(list);
+ return;
+ }
+ for (int i = 0; i < list.size(); i++) {
+ this.setSingleHouseId(list.get(i));
+ }
+ }
+
+ /**
+ * 璁剧疆鍒楄〃鏁版嵁
+ *
+ * @param list 鏂板垪琛ㄦ暟鎹�
+ */
public void setHouseIdList(List<HouseIdBean> list) {
if (list == null || list.size() == 0) {
return;
@@ -348,14 +375,7 @@
* @param pageNo 椤电爜
* @param pageSize 椤垫暟锛堜竴椤靛灏戞暟鎹級
*/
- public void getResidenceIdList(
- String key,
- String keyValue,
- String installedCapacityMin,
- String installedCapacityMax,
- String debugStatus,
- String powerStationStatus,
- long pageNo, long pageSize, CloudCallBeak<HouseBeanClass> cloudCallBeak) {
+ public void getResidenceIdList(String key, String keyValue, String installedCapacityMin, String installedCapacityMax, String debugStatus, String powerStationStatus, long pageNo, long pageSize, CloudCallBeak<HouseBeanClass> cloudCallBeak) {
String requestUrl = HttpApi.POST_PowerStation_List;
JsonObject json = new JsonObject();
@@ -914,8 +934,7 @@
*
* @param homeId 浣忓畢id
*/
- public void getResidenceInverterAllInfo(String
- homeId, CloudCallBeak<Bitmap> cloudCallBeak) {
+ public void getResidenceInverterAllInfo(String homeId, CloudCallBeak<Bitmap> cloudCallBeak) {
String requestUrl = HttpApi.POST_inverter_allInfo;
JsonObject json = new JsonObject();
json.addProperty("homeId", homeId);
@@ -945,8 +964,7 @@
* @param debugPerm 鎺堟潈鐘舵�侊紙true鍙互缁х画璋冭瘯锛�
* @param cloudCallBeak -
*/
- public void homeUpdateDebugPerm(String homeId, boolean debugPerm, CloudCallBeak<
- Boolean> cloudCallBeak) {
+ public void homeUpdateDebugPerm(String homeId, boolean debugPerm, CloudCallBeak<Boolean> cloudCallBeak) {
String requestUrl = HttpApi.C_POST_HOME_UPDATEDEBUGPERM;
JsonObject json = new JsonObject();
json.addProperty("homeId", homeId);
@@ -1043,8 +1061,7 @@
* @param account C绔处鍙�
* @param cloudCallBeak -
*/
- public void getDeliverToAccount(String homeId, String
- account, CloudCallBeak<Boolean> cloudCallBeak) {
+ public void getDeliverToAccount(String homeId, String account, CloudCallBeak<Boolean> cloudCallBeak) {
String requestUrl = HttpApi.POST_deliverToAccount;
JsonObject json = new JsonObject();
json.addProperty("homeId", homeId);
diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/CPowerStationActivity.java b/app/src/main/java/com/hdl/photovoltaic/ui/CPowerStationActivity.java
index beeb554..9dcfb51 100644
--- a/app/src/main/java/com/hdl/photovoltaic/ui/CPowerStationActivity.java
+++ b/app/src/main/java/com/hdl/photovoltaic/ui/CPowerStationActivity.java
@@ -236,7 +236,7 @@
}
UserConfigManage.getInstance().setUniBottomSafeDistanceBackgroundColor(0);
List<HouseIdBean> HouseIdList = HdlResidenceLogic.getInstance().getHouseIdList();
- if (HouseIdList.size() == 0) {
+ if (HouseIdList.isEmpty()) {
if (TextUtils.isEmpty(UserConfigManage.getInstance().getHomeId())) {
String path = HDLUniMP.UNI_EVENT_OPEN_HOME_Null_C;
HdlUniLogic.getInstance().openUniMP(path, null);
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 c2e619e..e73d49b 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
@@ -15,6 +15,8 @@
import androidx.recyclerview.widget.RecyclerView;
import com.hdl.photovoltaic.R;
+import com.hdl.photovoltaic.enums.DebugStatus;
+import com.hdl.photovoltaic.enums.DeliverStatus;
import com.hdl.photovoltaic.enums.PowerStationStatus;
import com.hdl.photovoltaic.enums.UnitType;
import com.hdl.photovoltaic.other.HdlCommonLogic;
@@ -73,7 +75,7 @@
holder.home_location_tv.setText(houseIdBean.getHomeAddress());
holder.item_parent_rl.setTag(position);
- setTextViewStyle(holder.stateTv, houseIdBean.getPowerStationStatus());
+ setHomeStateTextViewStyle(holder.home_state_tv, houseIdBean.getPowerStationStatus());
GlideUtils.getRoundedCornersImage(mContext, houseIdBean.getPowerStationImage(), holder.homeIconIv, 6);
// HdlLogLogic.print("---鐢电珯鍚嶇О:" + houseIdBean.getHomeName() + "---鍥剧墖url:" + houseIdBean.getPowerStationImage(), false);
holder.item_parent_rl.setOnClickListener(new View.OnClickListener() {
@@ -88,7 +90,7 @@
}
});
//绉诲姩鐢电珯浣嶇疆
- holder.move_home_ll.setOnClickListener(new View.OnClickListener() {
+ holder.home_move_ll.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
try {
@@ -99,13 +101,13 @@
}
}
});
- holder.del_home_ll.setVisibility(View.GONE);
- if (houseIdBean.getDeliverStatus().equals("UNDELIVERED")) {
+ holder.home_del_ll.setVisibility(View.GONE);
+ if (houseIdBean.getDeliverStatus().equals(DeliverStatus.UNDELIVERED)) {
//鏈氦浠樺畬瑕佹樉绀哄垹闄ゆ寜閽�
- holder.del_home_ll.setVisibility(View.VISIBLE);
+ holder.home_del_ll.setVisibility(View.VISIBLE);
}
//鍒犻櫎鐢电珯
- holder.del_home_ll.setOnClickListener(new View.OnClickListener() {
+ holder.home_del_ll.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
try {
@@ -150,7 +152,7 @@
}
/**
- * 鏀瑰彉缁勪欢鏍峰紡
+ * 璁剧疆銆愮數绔欒皟璇曠姸鎬併�戠粍浠舵牱寮�
*
* @param textView 鏄剧ず缁勪欢
* 濡傛灉璁惧浠庢潵娌′笂鎶ヨ繃鏁版嵁鏁版嵁 鐘舵�侊細杩炴帴涓�
@@ -159,7 +161,67 @@
* 璁惧绂荤嚎 鐘舵�侊細绂荤嚎
* @param state_value 鐢电珯鐘舵��(1:姝e父(杩愯),2:绂荤嚎,3:杩炴帴涓�,4:鏁呴殰,5:绂荤嚎鏈夋晠闅�)
*/
- private void setTextViewStyle(TextView textView, int state_value) {
+ private void setHomeDebugStateTextViewStyle(TextView textView, int state_value) {
+
+ String text = mContext.getString(R.string.my_power_station_operation);
+ Drawable drawable = AppCompatResources.getDrawable(mContext, R.drawable.device_state_ff38c494);
+ if (mPowerStationStatus.equals(DebugStatus.All)) {
+ switch (state_value) {
+ case 1: {
+ text = mContext.getString(R.string.my_power_station_operation);
+ }
+ break;
+
+ case 2: {
+ text = mContext.getString(R.string.my_power_station_off_line);
+ drawable = AppCompatResources.getDrawable(mContext, R.drawable.device_state_ffb9b9b9);
+ }
+ break;
+ case 3: {
+ text = mContext.getString(R.string.my_power_station_connecting);
+ drawable = AppCompatResources.getDrawable(mContext, R.drawable.device_satte_ffb300);
+ }
+ break;
+ case 4:
+ case 5: {
+ text = mContext.getString(R.string.my_power_station_malfunction);
+ drawable = AppCompatResources.getDrawable(mContext, R.drawable.device_state_fff55252);
+ }
+ //5:绂荤嚎鏈夋晠闅淥ffline_fault
+ break;
+// case 5: {
+// text = mContext.getString(R.string.Offline_fault);
+// drawable = AppCompatResources.getDrawable(mContext, R.drawable.state_e34343);
+// }
+// break;
+ }
+ } else if (mPowerStationStatus.equals(PowerStationStatus.malfunction)) {
+ text = mContext.getString(R.string.my_power_station_malfunction);
+ drawable = AppCompatResources.getDrawable(mContext, R.drawable.device_state_fff55252);
+ } else if (mPowerStationStatus.equals(PowerStationStatus.off)) {
+ text = mContext.getString(R.string.my_power_station_off_line);
+ drawable = AppCompatResources.getDrawable(mContext, R.drawable.device_state_ffb9b9b9);
+ } else if (mPowerStationStatus.equals(PowerStationStatus.connecting)) {
+ text = mContext.getString(R.string.my_power_station_connecting);
+ drawable = AppCompatResources.getDrawable(mContext, R.drawable.device_satte_ffb300);
+ }
+// textView.setText(text);
+ textView.setBackground(drawable);
+
+
+ }
+
+ /**
+ * 璁剧疆銆愮數绔欑姸鎬併�戠粍浠舵牱寮�
+ *
+ * @param textView 鏄剧ず缁勪欢
+ * 濡傛灉璁惧浠庢潵娌′笂鎶ヨ繃鏁版嵁鏁版嵁 鐘舵�侊細杩炴帴涓�
+ * 璁惧鍦ㄧ嚎 浣嗘槸褰撳墠澶勪簬鏁呴殰 鐘舵�侊細鏁呴殰
+ * 璁惧鍦ㄧ嚎锛堟湁涓婃姤杩囨暟鎹紝娌℃湁鏁呴殰锛� 鐘舵�侊細鍦ㄧ嚎
+ * 璁惧绂荤嚎 鐘舵�侊細绂荤嚎
+ * @param state_value 鐢电珯鐘舵��(1:姝e父(杩愯),2:绂荤嚎,3:杩炴帴涓�,4:鏁呴殰,5:绂荤嚎鏈夋晠闅�)
+ */
+ private void setHomeStateTextViewStyle(TextView textView, int state_value) {
String text = mContext.getString(R.string.my_power_station_operation);
Drawable drawable = AppCompatResources.getDrawable(mContext, R.drawable.device_state_ff38c494);
@@ -225,10 +287,10 @@
public TextView output_kw_unit;//棰濆畾鍔熺巼鍗曚綅
public TextView battery_storage_value_tv;//鐢垫睜鑳介噺
public TextView battery_storage_kw_unit;//鐢垫睜鑳介噺鍗曚綅
- public TextView stateTv;//鐢电珯鐘舵��(杩炴帴涓�,杩愯,绂荤嚎,鏁呴殰);
+ public TextView home_state_tv;//鐢电珯鐘舵��(杩炴帴涓�,杩愯,绂荤嚎,鏁呴殰);
public RelativeLayout item_parent_rl;//鏉$洰鐖跺鍣�
- public LinearLayout move_home_ll;//绉诲姩鐢电珯浣嶇疆
- public LinearLayout del_home_ll;//鍒犻櫎鐢电珯
+ public LinearLayout home_move_ll;//绉诲姩鐢电珯浣嶇疆
+ public LinearLayout home_del_ll;//鍒犻櫎鐢电珯
public TextView home_location_tv;//鐢电珯鍦板潃
public SwipeLayout item_parent_swipeLayout;//鐖跺鍣�
@@ -244,10 +306,10 @@
output_kw_unit = itemView.findViewById(R.id.output_kw_unit);
battery_storage_value_tv = itemView.findViewById(R.id.battery_storage_value_tv);
battery_storage_kw_unit = itemView.findViewById(R.id.battery_storage_kw_unit);
- stateTv = itemView.findViewById(R.id.device_state_tv);
+ home_state_tv = itemView.findViewById(R.id.home_state_tv);
item_parent_rl = itemView.findViewById(R.id.item_parent_rl);
- move_home_ll = itemView.findViewById(R.id.move_ll);
- del_home_ll = itemView.findViewById(R.id.del_ll);
+ home_move_ll = itemView.findViewById(R.id.move_ll);
+ home_del_ll = itemView.findViewById(R.id.del_ll);
home_location_tv = itemView.findViewById(R.id.home_location_tv);
item_parent_swipeLayout = itemView.findViewById(R.id.item_parent_swipeLayout);
}
diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/newC/PowerStationsListEdit.java b/app/src/main/java/com/hdl/photovoltaic/ui/newC/PowerStationsListEdit.java
index 7ab4658..32fee9a 100644
--- a/app/src/main/java/com/hdl/photovoltaic/ui/newC/PowerStationsListEdit.java
+++ b/app/src/main/java/com/hdl/photovoltaic/ui/newC/PowerStationsListEdit.java
@@ -5,6 +5,7 @@
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
+import android.text.TextUtils;
import android.view.View;
import androidx.recyclerview.widget.LinearLayoutManager;
@@ -12,6 +13,7 @@
import com.google.gson.JsonObject;
import com.hdl.linkpm.sdk.core.exception.HDLException;
+import com.hdl.linkpm.sdk.user.HDLLinkPMUser;
import com.hdl.photovoltaic.R;
import com.hdl.photovoltaic.base.CustomBaseActivity;
import com.hdl.photovoltaic.config.ConstantManage;
@@ -21,6 +23,7 @@
import com.hdl.photovoltaic.internet.HttpClient;
import com.hdl.photovoltaic.listener.CloudCallBeak;
import com.hdl.photovoltaic.other.HdlCommonLogic;
+import com.hdl.photovoltaic.other.HdlLogLogic;
import com.hdl.photovoltaic.other.HdlResidenceLogic;
import com.hdl.photovoltaic.other.HdlThreadLogic;
import com.hdl.photovoltaic.other.HdlUniLogic;
@@ -38,6 +41,7 @@
import org.greenrobot.eventbus.ThreadMode;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
/**
@@ -67,6 +71,8 @@
initView();
//鍒濆鍖栫晫闈㈢洃鍚櫒
initEvent();
+ //鍚庡彴璇诲彇浣忓畢鍒楄〃
+ downReadData(false);
}
private void initData() {
@@ -99,7 +105,6 @@
viewBinding.fragmentHouseSrl.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
@Override
public void onRefresh() {
- HdlResidenceLogic.getInstance().clearHouseList();
downReadData(true);
}
});
@@ -177,14 +182,20 @@
//鍏抽棴涓嬫媺鍒锋柊鐨勫湀鍦�
viewBinding.fragmentHouseSrl.setRefreshing(false);
}
- if (list != null && list.size() > 0) {
- //鏇存柊缂撳瓨
- HdlResidenceLogic.getInstance().setHouseIdList(list);
- if (houseListAdapter != null) {
- initData();
- setSelectState();
- //鏇存柊UI
- houseListAdapter.setList(houseListBeanIDList);
+ if (list != null && !list.isEmpty()) {
+ if (!comparableList(houseListBeanIDList, list)) {
+ //鏇存柊缂撳瓨
+ HdlResidenceLogic.getInstance().setHouseIdList(list, true);
+ if (houseListAdapter != null) {
+ //閲嶆柊鑾峰彇鍒楄〃鏁版嵁
+ initData();
+ refreshDetails();
+ //鏇存柊鐢电珯閫変腑鐘舵��
+ setSelectState();
+ //鏇存柊鍒楄〃鏁版嵁
+ houseListAdapter.setList(houseListBeanIDList);
+ }
+
}
}
@@ -333,4 +344,68 @@
}
}
+
+ /**
+ * 姣旇緝浣忓畢鍒楄〃鏁版嵁鏄惁閮戒竴鏍�
+ *
+ * @param oldList 鏃у垪琛�
+ * @param newList 鏂板垪琛�
+ * @return 鐩稿悓杩斿洖true锛屽惁鍒欒繑鍥瀎alse
+ */
+ boolean comparableList(List<HouseIdBean> oldList, List<HouseIdBean> newList) {
+ if (oldList == null || newList == null) return false;
+ if (oldList.size() != newList.size()) return false;
+ List<String> oidStrList = new ArrayList<>();
+ for (int i = 0; i < oldList.size(); i++) {
+ oidStrList.add(oldList.get(i).getHomeId());
+ }
+
+ List<String> newStrList = new ArrayList<>();
+ for (int i = 0; i < newList.size(); i++) {
+ newStrList.add(newList.get(i).getHomeId());
+ }
+ Collections.sort(oidStrList);
+ Collections.sort(newStrList);
+ return oidStrList.equals(newStrList);
+ }
+
+ /**
+ * 閫氱煡uni鏇存柊鏁版嵁
+ * 锛堝湪骞冲彴涓婂垹闄绔綋鍓嶄綇瀹呭悗,鑾峰彇鍒楄〃瀹炴敹瑕侀�氱煡uni閭h竟鏇存柊鐣岄潰鍗$墖锛�
+ */
+ private void refreshDetails() {
+ try {
+ List<HouseIdBean> localHouseIdList = HdlResidenceLogic.getInstance().getHouseIdList();
+ if (localHouseIdList.isEmpty()) {
+ JsonObject jsonObject = new JsonObject();
+ jsonObject.addProperty("homeId", "");
+ HDLUniMP.UniCallBackBaseBean uniCallBackBaseBean = new HDLUniMP.UniCallBackBaseBean();
+ uniCallBackBaseBean.setType(HDLUniMP.UNI_EVENT_NOTIFICATION_DEVICE_REFRESH_DETAILS);
+ uniCallBackBaseBean.setData(jsonObject);
+ HdlUniLogic.getInstance().sendUni(HDLUniMP.UNI_EVENT_NOTIFICATION_DEVICE_MODEL, uniCallBackBaseBean);
+ } else {
+ int select_home = -1;
+ for (int i = 0; i < localHouseIdList.size(); i++) {
+ if (localHouseIdList.get(i).getHomeId().equals(UserConfigManage.getInstance().getHomeId())) {
+ select_home = i;
+ break;
+ }
+ }
+ if (select_home == -1) {
+ //鎵句笉鍒伴粯璁ょ涓�涓�
+ HouseIdBean houseIdBean = localHouseIdList.get(0);
+ HdlResidenceLogic.getInstance().switchHouse(houseIdBean, true);
+ JsonObject jsonObject = new JsonObject();
+ jsonObject.addProperty("homeId", houseIdBean.getHomeId());
+ jsonObject.addProperty("homeName", houseIdBean.getHomeName());
+ jsonObject.addProperty("powerStationStatus", houseIdBean.getPowerStationStatus() + "");
+ HDLUniMP.UniCallBackBaseBean uniCallBackBaseBean = new HDLUniMP.UniCallBackBaseBean();
+ uniCallBackBaseBean.setType(HDLUniMP.UNI_EVENT_NOTIFICATION_DEVICE_REFRESH_DETAILS);
+ uniCallBackBaseBean.setData(jsonObject);
+ HdlUniLogic.getInstance().sendUni(HDLUniMP.UNI_EVENT_NOTIFICATION_DEVICE_MODEL, uniCallBackBaseBean);
+ }
+ }
+ } catch (Exception e) {
+ }
+ }
}
\ No newline at end of file
diff --git a/app/src/main/res/layout/item_plant_details.xml b/app/src/main/res/layout/item_plant_details.xml
index a83ff48..328d31c 100644
--- a/app/src/main/res/layout/item_plant_details.xml
+++ b/app/src/main/res/layout/item_plant_details.xml
@@ -21,7 +21,7 @@
android:layout_marginStart="@dimen/dp_16"
android:layout_marginEnd="@dimen/dp_16"
android:background="@drawable/bj_ff1c1c1e">
-
+ <!--鐢电珯鍥剧墖-->
<ImageView
android:id="@+id/home_image_iv"
android:layout_width="44dp"
@@ -29,14 +29,14 @@
android:layout_marginStart="@dimen/dp_16"
android:layout_marginTop="@dimen/dp_13"
android:scaleType="centerCrop" />
-
-
+ <!--鐢电珯鍚嶇О浠ュ強鍦板潃-->
<LinearLayout
android:id="@+id/home_name_ll"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_20"
android:layout_marginStart="@dimen/dp_5"
android:layout_marginTop="14.5dp"
+ android:layout_toStartOf="@+id/home_debug_state_ll"
android:layout_toEndOf="@+id/home_image_iv"
android:gravity="center_vertical"
android:orientation="horizontal">
@@ -47,7 +47,7 @@
android:gravity="center">
<TextView
- android:id="@+id/device_state_tv"
+ android:id="@+id/home_state_tv"
android:layout_width="7dp"
android:layout_height="7dp"
android:background="@drawable/device_state_ff38c494" />
@@ -59,13 +59,39 @@
android:layout_height="match_parent"
android:ellipsize="end"
android:gravity="center_vertical|start"
- android:paddingEnd="@dimen/dp_20"
+ android:paddingStart="0dp"
+ android:paddingEnd="@dimen/dp_5"
android:singleLine="true"
android:text="@string/power_station"
android:textColor="@color/text_FFACACAC"
android:textSize="@dimen/text_14" />
</LinearLayout>
+ <!--鐢电珯鐘舵��-->
+ <LinearLayout
+ android:id="@+id/home_debug_state_ll"
+ android:layout_width="wrap_content"
+ android:layout_height="@dimen/dp_18"
+ android:layout_alignParentTop="true"
+ android:layout_alignParentEnd="true"
+ android:layout_marginTop="@dimen/dp_14"
+ android:orientation="horizontal">
+ <ImageView
+ android:id="@+id/home_debug_state_iv"
+ android:layout_width="@dimen/dp_18"
+ android:layout_height="@dimen/dp_18"
+ android:src="@drawable/initiai" />
+
+ <TextView
+ android:id="@+id/home_debug_state_tv"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:paddingStart="0dp"
+ android:paddingEnd="@dimen/dp_16"
+ android:text="Initial"
+ android:textColor="@color/text_FFACACAC"
+ android:textSize="@dimen/text_12" />
+ </LinearLayout>
<!--鐢电珯鍦板潃-->
<LinearLayout
android:layout_width="match_parent"
@@ -80,10 +106,12 @@
<TextView
android:id="@+id/home_location_tv"
- android:layout_width="280dp"
+ android:layout_width="match_parent"
android:layout_height="match_parent"
android:ellipsize="end"
android:gravity="center_vertical|start"
+ android:paddingStart="0dp"
+ android:paddingEnd="@dimen/dp_5"
android:singleLine="true"
android:text="@string/power_station"
android:textColor="@color/text_FF5B5B5B"
--
Gitblit v1.8.0