diff --git a/app/src/main/java/com/rehome/zhdcoa/adapter/DeviceOverviewListAdapter.kt b/app/src/main/java/com/rehome/zhdcoa/adapter/DeviceOverviewListAdapter.kt index e1e239d..64b3dc6 100644 --- a/app/src/main/java/com/rehome/zhdcoa/adapter/DeviceOverviewListAdapter.kt +++ b/app/src/main/java/com/rehome/zhdcoa/adapter/DeviceOverviewListAdapter.kt @@ -99,11 +99,16 @@ class DeviceOverviewListAdapter( binding.ivDevicePhoto.setImageDrawable(drawable) } - binding.tvMc.text = itemBean.name if(!TextUtils.isEmpty(itemBean.areaFullName)){ - binding.tvArea.text = itemBean.areaFullName + binding.tvMc.text = itemBean.areaFullName+" > "+itemBean.name + }else{ + binding.tvMc.text = itemBean.name } binding.tvSbzt.text = itemBean.description + if(!TextUtils.isEmpty(itemBean.description)&&"正常"==itemBean.description){ + binding.tvSbzt.setTextColor(Color.parseColor("#67C23A"))//0099ff + } + if(itemBean.online){ binding.tvZxzt.text = "在线" binding.tvZxzt.setTextColor(Color.parseColor("#67C23A"))//0099ff @@ -111,8 +116,6 @@ class DeviceOverviewListAdapter( binding.tvZxzt.text = "离线" binding.tvZxzt.setTextColor(Color.parseColor("#ff0000")) } - binding.tvZtsysc.text = itemBean.continuedTime - binding.tvAzsj.text = itemBean.installTime binding.tvYczsc.text = itemBean.runningTime binding.tvSjgxsj.text = itemBean.warningTime binding.llCwcz.setOnClickListener { diff --git a/app/src/main/res/layout/adapter_device_overview_list.xml b/app/src/main/res/layout/adapter_device_overview_list.xml index 809769a..2b35be7 100644 --- a/app/src/main/res/layout/adapter_device_overview_list.xml +++ b/app/src/main/res/layout/adapter_device_overview_list.xml @@ -11,75 +11,99 @@ android:id="@+id/ll_cwcz" android:layout_width="match_parent" android:layout_height="wrap_content" - android:visibility="visible" - android:orientation="horizontal"> + android:orientation="horizontal" + android:visibility="visible"> + + + + + + + + + android:gravity="center_vertical" + android:orientation="horizontal"> + + + + + - - - + + android:text="设备状态:" /> + android:layout_weight="1" /> + @@ -88,153 +112,72 @@ style="@style/deviceManagerStyle" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="设备名称:" /> + android:text="在线状态:" /> + android:layout_weight="1" /> - - - - - - - - + android:layout_weight="1" + android:orientation="horizontal"> - + - + + - - - - - - - - - - - - - - - - - + android:layout_weight="1" + android:orientation="horizontal"> - + - + + - - - - - - diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index a795c07..c1e53bd 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -140,6 +140,10 @@ + +