Bladeren bron

设备信息增加485地址显示

weizhengliang 3 jaren geleden
bovenliggende
commit
086cd3c780

+ 4 - 1
conversion_box/src/main/java/com/wdkl/app/ncs/conversion_box/adapter/BedItemAdapter.kt

@@ -34,6 +34,7 @@ class BedItemAdapter : RecyclerView.Adapter<BedItemAdapter.BedViewHolder> {
         holder?.bedDevice?.text = mainData.get(position).device.name
         holder?.bedType?.text = "" + mainData.get(position).device.deviceType
         holder?.bedAddr?.text = mainData.get(position).device.ethMac
+        holder?.bed485Addr?.text = mainData.get(position).device.sipId
     }
 
     override fun getItemCount(): Int {
@@ -50,12 +51,14 @@ class BedItemAdapter : RecyclerView.Adapter<BedItemAdapter.BedViewHolder> {
         var bedDevice : TextView
         var bedType : TextView
         var bedAddr : TextView
+        var bed485Addr : TextView
 
         constructor(itemView: View): super(itemView) {
             bedName = itemView.findViewById(R.id.tv_bed_item_name)
             bedDevice = itemView.findViewById(R.id.tv_bed_device_name)
             bedType = itemView.findViewById(R.id.tv_bed_item_type)
-            bedAddr = itemView.findViewById(R.id.tv_bed_item_addr)
+            bedAddr = itemView.findViewById(R.id.tv_bed_item_mac_addr)
+            bed485Addr = itemView.findViewById(R.id.tv_bed_item_485_addr)
         }
     }
 }

+ 10 - 2
conversion_box/src/main/res/layout/bed_item_view.xml

@@ -28,10 +28,18 @@
         android:text="类型"/>
 
     <TextView
-        android:id="@+id/tv_bed_item_addr"
+        android:id="@+id/tv_bed_item_mac_addr"
         android:layout_width="0dp"
         android:layout_height="wrap_content"
         android:layout_weight="1"
         android:padding="8dp"
-        android:text="地址"/>
+        android:text="mac地址"/>
+
+    <TextView
+        android:id="@+id/tv_bed_item_485_addr"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_weight="1"
+        android:padding="8dp"
+        android:text="485地址"/>
 </LinearLayout>

+ 9 - 1
conversion_box/src/main/res/layout/conversion_box_main_lay.xml

@@ -39,7 +39,15 @@
                 android:layout_height="wrap_content"
                 android:layout_weight="1"
                 android:padding="8dp"
-                android:text="设备地址"
+                android:text="mac地址"
+                android:textColor="@color/main_color"/>
+            <TextView
+                android:id="@+id/tv_bed_list_485"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:padding="8dp"
+                android:text="485地址"
                 android:textColor="@color/main_color"/>
         </LinearLayout>
 

+ 1 - 1
conversion_box/src/main/res/layout/main_activity_layout.xml

@@ -80,7 +80,7 @@
         <!--fragment区域-->
         <FrameLayout
             android:id="@+id/callingbed2_main_frame"
-            android:layout_width="500dp"
+            android:layout_width="580dp"
             android:layout_height="match_parent"
             android:layout_marginTop="10dp"
             android:layout_marginBottom="10dp"