设备管理完成部分
parent
0717179f3c
commit
68009b4c8c
@ -0,0 +1,188 @@
|
||||
package com.rehome.zhdcoa.adapter
|
||||
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.graphics.Bitmap
|
||||
import android.graphics.BitmapFactory
|
||||
import android.graphics.drawable.BitmapDrawable
|
||||
import android.graphics.drawable.Drawable
|
||||
import android.text.TextUtils
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import com.rehome.zhdcoa.Contans
|
||||
import com.rehome.zhdcoa.Listener.OnItemClickListener
|
||||
import com.rehome.zhdcoa.R
|
||||
import com.rehome.zhdcoa.base.BaseViewBindingAdapter
|
||||
import com.rehome.zhdcoa.bean.DeviceManagerListResultBean
|
||||
import com.rehome.zhdcoa.databinding.AdapterDeviceManagerListBinding
|
||||
import com.rehome.zhdcoa.utils.NohttpUtils
|
||||
import com.yolanda.nohttp.NoHttp
|
||||
import com.yolanda.nohttp.rest.CacheMode
|
||||
import com.yolanda.nohttp.rest.OnResponseListener
|
||||
import com.yolanda.nohttp.rest.RequestQueue
|
||||
import com.yolanda.nohttp.rest.Response
|
||||
import javax.net.ssl.HostnameVerifier
|
||||
|
||||
class DeviceManagerListAdapter(
|
||||
var context: Context,
|
||||
var data: MutableList<DeviceManagerListResultBean.DeviceManagerItem>,
|
||||
var onItemClickListener: OnItemClickListener,
|
||||
var onItemClickListenerDetail: OnItemClickListener
|
||||
) : BaseViewBindingAdapter<AdapterDeviceManagerListBinding>(context) {
|
||||
override fun getCount(): Int {
|
||||
return data.count()
|
||||
}
|
||||
|
||||
override fun getItem(position: Int): Any {
|
||||
return data[position]
|
||||
}
|
||||
|
||||
override fun getItemId(position: Int): Long {
|
||||
return position.toLong()
|
||||
}
|
||||
|
||||
|
||||
override fun getBinding(inflater: LayoutInflater, parent: ViewGroup?) =
|
||||
AdapterDeviceManagerListBinding.inflate(inflater, parent, false)
|
||||
|
||||
@SuppressLint("SetTextI18n", "DefaultLocale")
|
||||
override fun handleData(position: Int, binding: AdapterDeviceManagerListBinding) {
|
||||
val itemBean: DeviceManagerListResultBean.DeviceManagerItem = data[position]
|
||||
if (!TextUtils.isEmpty(itemBean.fileName)) {
|
||||
//binding.ivDevicePhoto.setImageBitmap()
|
||||
// Glide.with(viewHolder.itemView.getContext())
|
||||
// .load(Uri.parse(mediaUrl))
|
||||
// .centerCrop()
|
||||
// .placeholder(R.color.app_color_f6)
|
||||
// .diskCacheStrategy(DiskCacheStrategy.ALL)
|
||||
// .into(viewHolder.mImg);
|
||||
|
||||
// Glide.with(viewHolder.itemView.getContext())
|
||||
// .load(mediaUrl)
|
||||
// .dontAnimate()
|
||||
// .skipMemoryCache(true)
|
||||
// .diskCacheStrategy(DiskCacheStrategy.NONE)
|
||||
// .placeholder(R.drawable.head_photo)
|
||||
// .into(viewHolder.mImg);
|
||||
|
||||
// showLog(mediaUrl);
|
||||
// Request<Bitmap> request = NoHttp.createImageRequest(mediaUrl);
|
||||
|
||||
// NohttpUtils.getInstance().addNoProgress(context,0, request, new HttpListener<Bitmap>() {
|
||||
//
|
||||
// @Override
|
||||
// public void onSucceed(int what, com.yolanda.nohttp.rest.Response<Bitmap> response) {
|
||||
//
|
||||
// Bitmap picFile = response.get();
|
||||
// showLog(String.valueOf(picFile==null));
|
||||
// viewHolder.mImg.setImageBitmap(picFile);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onFailed(int what, com.yolanda.nohttp.rest.Response<Bitmap> response) {
|
||||
// showLog("设备图片加载失败");
|
||||
// }
|
||||
// });
|
||||
|
||||
val mediaUrl = Contans.IP + Contans.getImgDeviceOnlineBaseUrl+itemBean.fileName
|
||||
val request = NoHttp.createImageRequest(mediaUrl)
|
||||
request.cacheMode = CacheMode.NONE_CACHE_REQUEST_NETWORK
|
||||
|
||||
if (!TextUtils.isEmpty(mediaUrl)) {
|
||||
Log.i("app", "fullPath is:$mediaUrl")
|
||||
if (!TextUtils.isEmpty(request.url())) {
|
||||
val url = request.url()
|
||||
if (url.startsWith("https://219.131.195.3:7100") || url.startsWith("https://219.131.195.3:7011") || url.startsWith(
|
||||
"https://219.131.195.3:7081"
|
||||
) || url.startsWith("https://219.131.195.3:7082")
|
||||
) {
|
||||
val socketFactory = NohttpUtils.getSSLSocketFactory(context)
|
||||
if (socketFactory != null) {
|
||||
request.sslSocketFactory = socketFactory
|
||||
request.hostnameVerifier = HostnameVerifier { s, sslSession -> true }
|
||||
}
|
||||
}
|
||||
}
|
||||
val queue: RequestQueue = NoHttp.newRequestQueue(1)
|
||||
queue.add<Bitmap>(6, request, object : OnResponseListener<Bitmap?> {
|
||||
override fun onStart(what: Int) {
|
||||
}
|
||||
|
||||
override fun onFailed(what: Int, response: Response<Bitmap?>?) {
|
||||
val bitmap = BitmapFactory.decodeResource(context.resources, R.drawable.icon_device_place)
|
||||
val drawable: Drawable = BitmapDrawable(context.resources, bitmap)
|
||||
binding.ivDevicePhoto.setImageDrawable(drawable)
|
||||
}
|
||||
|
||||
override fun onSucceed(what: Int, response: Response<Bitmap?>?) {
|
||||
val bitmap = response?.get()
|
||||
if(bitmap!=null){
|
||||
val drawable: Drawable = BitmapDrawable(context.resources, bitmap)
|
||||
binding.ivDevicePhoto.setImageDrawable(drawable)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onFinish(what: Int) {
|
||||
}
|
||||
})
|
||||
}
|
||||
}else{
|
||||
val bitmap = BitmapFactory.decodeResource(context.resources, R.drawable.icon_device_place)
|
||||
val drawable: Drawable = BitmapDrawable(context.resources, bitmap)
|
||||
binding.ivDevicePhoto.setImageDrawable(drawable)
|
||||
}
|
||||
|
||||
// if (!TextUtils.isEmpty(itemBean.position)) {
|
||||
// val deviceOnlineStatusAreaBeanStr: String? =
|
||||
// SPUtils.get(context, Contans.DeviceOnlineStatusAreaBean, "") as String?
|
||||
// if (deviceOnlineStatusAreaBeanStr != null) {
|
||||
// val bean = GsonUtils.GsonToBean(
|
||||
// deviceOnlineStatusAreaBeanStr,
|
||||
// DeviceOnlineStatusAreaBean::class.java
|
||||
// )
|
||||
// if (bean != null && bean.code == 20000 && bean.isSuccess && bean.data != null && bean.data.size > 0) {
|
||||
// val areaList: MutableList<DeviceOnlineStatusAreaBean.DeviceArea> =
|
||||
// mutableListOf()//在线设备区域列表
|
||||
// areaList.addAll(bean.data)
|
||||
// //更新区域
|
||||
// for (itemArea in areaList) {
|
||||
// if (itemArea.nodeList != null && itemArea.nodeList.size > 0) {
|
||||
// for (itemNodeList in itemArea.nodeList) {
|
||||
// if (!TextUtils.isEmpty(itemNodeList.nodeKey)) {
|
||||
// if (itemNodeList.nodeKey == itemBean.position) {
|
||||
// if (!TextUtils.isEmpty(itemNodeList.cname)) {
|
||||
// itemBean.nodeListCname = itemNodeList.cname
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
binding.tvMc.text = itemBean.name
|
||||
if(!TextUtils.isEmpty(itemBean.areaFullName)){
|
||||
binding.tvArea.text = itemBean.areaFullName
|
||||
}
|
||||
binding.tvSbzt.text = itemBean.description
|
||||
if(itemBean.online){
|
||||
binding.tvZxzt.text = "在线"
|
||||
}else{
|
||||
binding.tvZxzt.text = "离线"
|
||||
}
|
||||
binding.tvZtsysc.text = itemBean.continuedTime
|
||||
binding.tvAzsj.text = itemBean.installTime
|
||||
binding.tvYczsc.text = itemBean.runningTime
|
||||
binding.tvSjgxsj.text = itemBean.warningTime
|
||||
binding.tvPhotoManage.setOnClickListener {
|
||||
onItemClickListener.onItemClick(position, binding.tvPhotoManage)
|
||||
}
|
||||
binding.tvDetail.setOnClickListener {
|
||||
onItemClickListenerDetail.onItemClick(position, binding.tvDetail)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,179 @@
|
||||
package com.rehome.zhdcoa.bean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class DeviceManagerListResultBean extends DeviceAlarmBaseBean{
|
||||
private List<DeviceManagerItem> data;
|
||||
|
||||
public List<DeviceManagerItem> getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(List<DeviceManagerItem> data) {
|
||||
this.data = data;
|
||||
}
|
||||
/**
|
||||
* {
|
||||
* "code": "002c000e",
|
||||
* "name": "1A低旁液压油泵电机",
|
||||
* "areaId": "EAA45D00CD4F4F70B6BED584A1939AC1",
|
||||
* "online": false,
|
||||
* "temperatureWarn": null,
|
||||
* "displacementWarn": null,
|
||||
* "displacementFault": null,
|
||||
* "fileName": "002c000e_604c379fe0b649439e1ffc86c0c2a343.png",
|
||||
* "description": "振动异常",
|
||||
* "warningTime": "2025-05-27 18:52:27",
|
||||
* "continuedTime": "3天5小时46分钟",
|
||||
* "installTime": null,
|
||||
* "runningTime": "0分钟",
|
||||
* "state": "normal"
|
||||
* }
|
||||
*/
|
||||
public static class DeviceManagerItem {
|
||||
private String code;//设备编码
|
||||
private String name;//设备名称
|
||||
private String areaId;//区域id
|
||||
private Boolean online;//设备是否在线
|
||||
private String temperatureWarn;//
|
||||
private String displacementWarn;//
|
||||
private String displacementFault;//机组
|
||||
private String fileName;//设备图片名称
|
||||
private String description;//报警描述
|
||||
private String warningTime;//数据更新时间
|
||||
private String continuedTime;//状态持续时间
|
||||
private String installTime;//安装时间
|
||||
private String runningTime;//运行总时长
|
||||
private String state;//设备状态
|
||||
private String areaFullPath;
|
||||
private String areaFullName;
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getAreaId() {
|
||||
return areaId;
|
||||
}
|
||||
|
||||
public void setAreaId(String areaId) {
|
||||
this.areaId = areaId;
|
||||
}
|
||||
|
||||
public Boolean getOnline() {
|
||||
return online;
|
||||
}
|
||||
|
||||
public void setOnline(Boolean online) {
|
||||
this.online = online;
|
||||
}
|
||||
|
||||
public String getTemperatureWarn() {
|
||||
return temperatureWarn;
|
||||
}
|
||||
|
||||
public void setTemperatureWarn(String temperatureWarn) {
|
||||
this.temperatureWarn = temperatureWarn;
|
||||
}
|
||||
|
||||
public String getDisplacementWarn() {
|
||||
return displacementWarn;
|
||||
}
|
||||
|
||||
public void setDisplacementWarn(String displacementWarn) {
|
||||
this.displacementWarn = displacementWarn;
|
||||
}
|
||||
|
||||
public String getDisplacementFault() {
|
||||
return displacementFault;
|
||||
}
|
||||
|
||||
public void setDisplacementFault(String displacementFault) {
|
||||
this.displacementFault = displacementFault;
|
||||
}
|
||||
|
||||
public String getFileName() {
|
||||
return fileName;
|
||||
}
|
||||
|
||||
public void setFileName(String fileName) {
|
||||
this.fileName = fileName;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getWarningTime() {
|
||||
return warningTime;
|
||||
}
|
||||
|
||||
public void setWarningTime(String warningTime) {
|
||||
this.warningTime = warningTime;
|
||||
}
|
||||
|
||||
public String getContinuedTime() {
|
||||
return continuedTime;
|
||||
}
|
||||
|
||||
public void setContinuedTime(String continuedTime) {
|
||||
this.continuedTime = continuedTime;
|
||||
}
|
||||
|
||||
public String getInstallTime() {
|
||||
return installTime;
|
||||
}
|
||||
|
||||
public void setInstallTime(String installTime) {
|
||||
this.installTime = installTime;
|
||||
}
|
||||
|
||||
public String getRunningTime() {
|
||||
return runningTime;
|
||||
}
|
||||
|
||||
public void setRunningTime(String runningTime) {
|
||||
this.runningTime = runningTime;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public String getAreaFullPath() {
|
||||
return areaFullPath;
|
||||
}
|
||||
|
||||
public void setAreaFullPath(String areaFullPath) {
|
||||
this.areaFullPath = areaFullPath;
|
||||
}
|
||||
|
||||
public String getAreaFullName() {
|
||||
return areaFullName;
|
||||
}
|
||||
|
||||
public void setAreaFullName(String areaFullName) {
|
||||
this.areaFullName = areaFullName;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
package com.rehome.zhdcoa.ui.activity
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.activity.enableEdgeToEdge
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.view.ViewCompat
|
||||
import androidx.core.view.WindowInsetsCompat
|
||||
import com.rehome.zhdcoa.R
|
||||
import com.rehome.zhdcoa.base.BaseActivityOaToolbarViewBinding
|
||||
import com.rehome.zhdcoa.databinding.ActivityDeviceOverviewListBinding
|
||||
import com.rehome.zhdcoa.weiget.OAToolbar
|
||||
|
||||
class DeviceOverviewListActivity : BaseActivityOaToolbarViewBinding<ActivityDeviceOverviewListBinding>() {
|
||||
override fun getViewBinding() = ActivityDeviceOverviewListBinding.inflate(layoutInflater)
|
||||
|
||||
override fun getToolbar() = binding.toolbarView.toolbar
|
||||
|
||||
override fun initView() {
|
||||
|
||||
}
|
||||
|
||||
override fun initData() {
|
||||
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
@ -0,0 +1,181 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="#E7F1F7"
|
||||
tools:context=".ui.activity.DeviceManagerListActivity">
|
||||
|
||||
<include
|
||||
android:id="@+id/toolbarView"
|
||||
layout="@layout/layout_base" />
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10px"
|
||||
android:layout_marginLeft="10px"
|
||||
android:layout_marginRight="10px"
|
||||
android:layout_marginTop="10px">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="horizontal">
|
||||
<TextView
|
||||
android:id="@+id/tv_area"
|
||||
android:padding="3dp"
|
||||
android:textColor="#333333"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="18sp"
|
||||
android:text="区域筛选:" />
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="76px"
|
||||
android:layout_marginEnd="2dp"
|
||||
android:layout_gravity="center_vertical">
|
||||
<EditText
|
||||
android:id="@+id/et_area"
|
||||
style="@style/editTextTheme"
|
||||
android:textSize="14sp"
|
||||
android:enabled="false"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:hint="请选择区域" />
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10px"
|
||||
android:layout_marginLeft="10px"
|
||||
android:layout_marginRight="10px"
|
||||
android:layout_marginTop="10px">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="horizontal">
|
||||
<TextView
|
||||
android:id="@+id/tv_sysit"
|
||||
android:padding="3dp"
|
||||
android:textColor="#333333"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="18sp"
|
||||
android:text="设备名称:" />
|
||||
<EditText
|
||||
android:id="@+id/et_key"
|
||||
style="@style/editTextTheme"
|
||||
android:textSize="14sp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:hint="请输入设备名称" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="horizontal">
|
||||
<TextView
|
||||
android:padding="3dp"
|
||||
android:textColor="#333333"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="18sp"
|
||||
android:text="状态:" />
|
||||
<RadioGroup
|
||||
android:id="@id/rg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb1"
|
||||
style="@style/Widget.AppCompat.CompoundButton.RadioButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:textSize="16sp"
|
||||
android:checked="true"
|
||||
android:text="在线" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb2"
|
||||
style="@style/Widget.AppCompat.CompoundButton.RadioButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:textSize="16sp"
|
||||
android:text="离线" />
|
||||
</RadioGroup>
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="2" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_marginBottom="10dp">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_query"
|
||||
style="@style/button"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_weight="1"
|
||||
android:textSize="18sp"
|
||||
android:text="查询" />
|
||||
|
||||
</LinearLayout>
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<com.rehome.zhdcoa.weiget.LoadListView
|
||||
android:id="@+id/lv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:divider="#00000000"
|
||||
android:dividerHeight="5dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nodata"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:textColor="@color/viewfinder_mask"
|
||||
android:gravity="center"
|
||||
android:text="暂无数据"/>
|
||||
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
@ -0,0 +1,159 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="#E7F1F7"
|
||||
tools:context=".ui.activity.DeviceOverviewListActivity">
|
||||
|
||||
<include
|
||||
android:id="@+id/toolbarView"
|
||||
layout="@layout/layout_base" />
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10px"
|
||||
android:layout_marginLeft="10px"
|
||||
android:layout_marginRight="10px"
|
||||
android:layout_marginTop="10px">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="horizontal">
|
||||
<TextView
|
||||
android:id="@+id/tv_sysit"
|
||||
android:padding="3dp"
|
||||
android:textColor="#333333"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="18sp"
|
||||
android:text="专业:" />
|
||||
<Spinner
|
||||
android:id="@+id/sp_zy"
|
||||
style="@style/editTextTheme"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="70px"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:padding="0px"
|
||||
android:textSize="@dimen/px_30" />
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_key"
|
||||
style="@style/editTextTheme"
|
||||
android:textSize="14sp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:hint="请转入关键字" />
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="horizontal">
|
||||
<TextView
|
||||
android:padding="3dp"
|
||||
android:textColor="#333333"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="18sp"
|
||||
android:text="状态:" />
|
||||
<RadioGroup
|
||||
android:id="@id/rg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb1"
|
||||
style="@style/Widget.AppCompat.CompoundButton.RadioButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:textSize="16sp"
|
||||
android:checked="true"
|
||||
android:text="在线" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb2"
|
||||
style="@style/Widget.AppCompat.CompoundButton.RadioButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:textSize="16sp"
|
||||
android:text="离线" />
|
||||
</RadioGroup>
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="2" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_marginBottom="10dp">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_query"
|
||||
style="@style/button"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_weight="1"
|
||||
android:textSize="18sp"
|
||||
android:text="查询" />
|
||||
|
||||
</LinearLayout>
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<com.rehome.zhdcoa.weiget.LoadListView
|
||||
android:id="@+id/lv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:divider="#00000000"
|
||||
android:dividerHeight="5dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nodata"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:textColor="@color/viewfinder_mask"
|
||||
android:gravity="center"
|
||||
android:text="暂无数据"/>
|
||||
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
@ -0,0 +1,266 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/ll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#ffffff"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_cwcz"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="visible"
|
||||
android:orientation="horizontal">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
tools:ignore="UselessParent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
tools:ignore="UselessParent">
|
||||
<LinearLayout
|
||||
style="@style/dagerListMarginTopStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
style="@style/dagerListMarginTopStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="0dp"
|
||||
android:orientation="horizontal">
|
||||
<ImageView
|
||||
android:id="@+id/iv_device_photo"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:contentDescription="@string/iv_device_photo"
|
||||
android:src="@drawable/icon_device_place"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
style="@style/dagerListMarginTopStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="2"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout
|
||||
style="@style/dagerListMarginTopStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
style="@style/deviceManagerStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="设备位置:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_area"
|
||||
style="@style/deviceManagerStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="#1锅炉区域 > 1号锅炉0米捞渣机,锅炉区域" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
style="@style/dagerListMarginTopStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
style="@style/deviceManagerStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="设备名称:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_mc"
|
||||
style="@style/deviceManagerStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="#1-2循环浆液泵电机尾部" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
style="@style/dagerListMarginTopStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
style="@style/dagerListMarginTopStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
style="@style/deviceManagerStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="设备状态:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_sbzt"
|
||||
style="@style/deviceManagerStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
style="@style/dagerListMarginTopStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
style="@style/deviceManagerStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="在线状态:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_zxzt"
|
||||
style="@style/deviceManagerStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
style="@style/dagerListMarginTopStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
style="@style/dagerListMarginTopStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
style="@style/deviceManagerStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="状态持续时长:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_ztsysc"
|
||||
style="@style/deviceManagerStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
style="@style/dagerListMarginTopStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
style="@style/deviceManagerStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:text="安装时间:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_azsj"
|
||||
style="@style/deviceManagerStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
style="@style/dagerListMarginTopStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
style="@style/dagerListMarginTopStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
style="@style/deviceManagerStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="运行总时长:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_yczsc"
|
||||
style="@style/deviceManagerStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
style="@style/dagerListMarginTopStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
style="@style/deviceManagerStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:text="数据更新时间:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_sjgxsj"
|
||||
style="@style/deviceManagerStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
style="@style/dagerListMarginTopStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_photo_manage"
|
||||
style="@style/dagerDetailLeftStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical|end"
|
||||
android:textColor="#0080ff"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:text="图片管理"/>
|
||||
<TextView
|
||||
android:id="@+id/tv_detail"
|
||||
style="@style/dagerDetailLeftStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical|end"
|
||||
android:textColor="#0080ff"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:text="设备详情"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
Loading…
Reference in New Issue