feat: 新增设备详情在线/故障/离线三态页面
@@ -168,6 +168,10 @@
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustResize" />
|
||||
<activity
|
||||
android:name=".product.DeviceDetailActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".login.LoginActivity"
|
||||
android:theme="@style/AppTheme.FullScreen"
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
package com.ckkj.griddlebiz.product;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
import com.ckkj.griddlebiz.R;
|
||||
import com.ckkj.griddlebiz.base.BaseActivityNoP;
|
||||
import com.ckkj.griddlebiz.databinding.DeviceDetailLayoutBinding;
|
||||
import com.ckkj.griddlebiz.network.BaseBean;
|
||||
import com.ckkj.griddlebiz.utils.show.ToastUtil;
|
||||
import com.gyf.immersionbar.ImmersionBar;
|
||||
|
||||
/**
|
||||
* 设备详情:在线、故障、离线三种状态共用一套信息列表,只切换状态卡。
|
||||
*/
|
||||
public class DeviceDetailActivity extends BaseActivityNoP<DeviceDetailLayoutBinding> {
|
||||
|
||||
public static final String EXTRA_STATE = "extra_state";
|
||||
public static final int STATE_ONLINE = 0;
|
||||
public static final int STATE_FAULT = 1;
|
||||
public static final int STATE_OFFLINE = 2;
|
||||
|
||||
public static Intent createIntent(Context context, int state) {
|
||||
return new Intent(context, DeviceDetailActivity.class)
|
||||
.putExtra(EXTRA_STATE, state);
|
||||
}
|
||||
|
||||
private int mState = STATE_ONLINE;
|
||||
|
||||
@Override
|
||||
public int getLayoutResId(Bundle savedInstanceState) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData(Bundle savedInstanceState) {
|
||||
super.initData(savedInstanceState);
|
||||
ImmersionBar.with(this)
|
||||
.statusBarColor(R.color.white)
|
||||
.statusBarDarkFont(true)
|
||||
.init();
|
||||
|
||||
mState = getIntent().getIntExtra(EXTRA_STATE, STATE_ONLINE);
|
||||
viewBinding.ivBack.setOnClickListener(v -> finish());
|
||||
applyState(mState);
|
||||
}
|
||||
|
||||
private void applyState(int state) {
|
||||
boolean online = state == STATE_ONLINE;
|
||||
boolean fault = state == STATE_FAULT;
|
||||
boolean offline = state == STATE_OFFLINE;
|
||||
|
||||
viewBinding.bannerOnline.setVisibility(online ? View.VISIBLE : View.GONE);
|
||||
viewBinding.bannerFault.setVisibility(fault ? View.VISIBLE : View.GONE);
|
||||
viewBinding.bannerOffline.setVisibility(offline ? View.VISIBLE : View.GONE);
|
||||
|
||||
if (online) {
|
||||
viewBinding.tvStatus.setText(R.string.device_manage_status_online);
|
||||
viewBinding.tvStatus.setBackgroundResource(R.drawable.device_manage_status_online_bg);
|
||||
viewBinding.tvStatus.setTextColor(getColor(R.color.device_manage_status_online));
|
||||
viewBinding.ivDeviceIcon.setImageResource(R.mipmap.icon_device_manage_box);
|
||||
} else if (fault) {
|
||||
viewBinding.tvStatus.setText(R.string.device_manage_status_fault);
|
||||
viewBinding.tvStatus.setBackgroundResource(R.drawable.device_manage_status_fault_bg);
|
||||
viewBinding.tvStatus.setTextColor(getColor(R.color.device_manage_status_fault));
|
||||
viewBinding.ivDeviceIcon.setImageResource(R.mipmap.icon_device_manage_box);
|
||||
} else {
|
||||
viewBinding.tvStatus.setText(R.string.device_manage_status_offline);
|
||||
viewBinding.tvStatus.setBackgroundResource(R.drawable.device_manage_status_offline_bg);
|
||||
viewBinding.tvStatus.setTextColor(getColor(R.color.device_manage_text_secondary));
|
||||
viewBinding.ivDeviceIcon.setImageResource(R.mipmap.icon_device_manage_box_offline);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showError(String message) {
|
||||
hideLoading();
|
||||
if (message != null && !message.isEmpty()) {
|
||||
ToastUtil.showShort(mContext, message);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void logOut(BaseBean bean) {
|
||||
}
|
||||
}
|
||||
@@ -37,6 +37,12 @@ public class DeviceManageActivity extends BaseActivityNoP<DeviceManageLayoutBind
|
||||
viewBinding.ivBack.setOnClickListener(v -> finish());
|
||||
viewBinding.tabAll.setOnClickListener(v -> selectTab(true));
|
||||
viewBinding.tabPending.setOnClickListener(v -> selectTab(false));
|
||||
viewBinding.cardOnline.setOnClickListener(v ->
|
||||
startActivity(DeviceDetailActivity.createIntent(mContext, DeviceDetailActivity.STATE_ONLINE)));
|
||||
viewBinding.cardFault.setOnClickListener(v ->
|
||||
startActivity(DeviceDetailActivity.createIntent(mContext, DeviceDetailActivity.STATE_FAULT)));
|
||||
viewBinding.cardOffline.setOnClickListener(v ->
|
||||
startActivity(DeviceDetailActivity.createIntent(mContext, DeviceDetailActivity.STATE_OFFLINE)));
|
||||
viewBinding.chipAll.setSelected(true);
|
||||
setupChipGroup(viewBinding.chipAll, viewBinding.chipOnline,
|
||||
viewBinding.chipOffline, viewBinding.chipFault);
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#FDECEC" />
|
||||
<corners android:radius="16dp" />
|
||||
</shape>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#DDDDDD" />
|
||||
<corners android:radius="16dp" />
|
||||
</shape>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#E9F7EF" />
|
||||
<corners android:radius="16dp" />
|
||||
</shape>
|
||||
532
app/src/main/res/layout/device_detail_layout.xml
Normal file
@@ -0,0 +1,532 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/white"
|
||||
android:fitsSystemWindows="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:background="@android:color/white">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_back"
|
||||
android:layout_width="22dp"
|
||||
android:layout_height="22dp"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
android:layout_marginStart="16dp"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/device_manage_back"
|
||||
android:focusable="true"
|
||||
android:src="@mipmap/icon_product_inbound_back" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="@string/device_detail_title"
|
||||
android:textColor="#222222"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
</FrameLayout>
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:background="#F5F5F5"
|
||||
android:fillViewport="true"
|
||||
android:overScrollMode="never"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="24dp">
|
||||
|
||||
<!-- 状态卡:底部提示条在上,白色设备头卡覆盖其上 -->
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:layout_marginTop="20dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/banner_online"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="114dp"
|
||||
android:background="@drawable/device_detail_banner_online_bg"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingTop="74dp"
|
||||
android:paddingEnd="12dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_device_detail_banner_online" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_weight="1"
|
||||
android:lineSpacingExtra="1dp"
|
||||
android:text="@string/device_detail_banner_online"
|
||||
android:textColor="#22A45D"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/banner_fault"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="135dp"
|
||||
android:background="@drawable/device_detail_banner_fault_bg"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingTop="74dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_device_detail_banner_fault" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:lineSpacingExtra="1dp"
|
||||
android:text="@string/device_detail_banner_fault"
|
||||
android:textColor="#E5484D"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:text="@string/device_detail_banner_fault_time"
|
||||
android:textColor="#666666"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/banner_offline"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="114dp"
|
||||
android:background="@drawable/device_detail_banner_offline_bg"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingTop="74dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_device_detail_banner_offline" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_weight="1"
|
||||
android:lineSpacingExtra="1dp"
|
||||
android:text="@string/device_detail_banner_offline"
|
||||
android:textColor="#666666"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="64dp"
|
||||
android:background="@drawable/device_manage_card_bg"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="14dp"
|
||||
android:paddingTop="14dp"
|
||||
android:paddingEnd="14dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_device_icon"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_device_manage_box" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="17dp"
|
||||
android:text="SN-AIR2024031201"
|
||||
android:textColor="#222222"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:text="KF-800 → Air Purifier KF-800"
|
||||
android:textColor="#999999"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_status"
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="27dp"
|
||||
android:layout_gravity="top"
|
||||
android:background="@drawable/device_manage_status_online_bg"
|
||||
android:gravity="center"
|
||||
android:minWidth="68dp"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:textColor="#22A45D"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="19dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="@string/device_detail_section_info"
|
||||
android:textColor="#222222"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:background="@drawable/device_manage_card_bg"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="20dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingBottom="20dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="21dp"
|
||||
android:layout_height="21dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_device_detail_sn" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="@string/device_detail_label_sn"
|
||||
android:textColor="#222222"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:gravity="end"
|
||||
android:maxWidth="171dp"
|
||||
android:text="SN-AIR2026031201"
|
||||
android:textColor="#666666"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="21dp"
|
||||
android:layout_height="21dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_device_detail_model" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="@string/device_detail_label_model"
|
||||
android:textColor="#222222"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:gravity="end"
|
||||
android:maxWidth="171dp"
|
||||
android:text="AIR2026031201"
|
||||
android:textColor="#666666"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="21dp"
|
||||
android:layout_height="21dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_device_detail_owner" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="@string/device_detail_label_owner"
|
||||
android:textColor="#222222"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:gravity="end"
|
||||
android:lineSpacingExtra="0.6dp"
|
||||
android:maxWidth="171dp"
|
||||
android:text="上海物业管理 有限公司"
|
||||
android:textColor="#666666"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="21dp"
|
||||
android:layout_height="21dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_device_detail_user" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="@string/device_detail_label_user"
|
||||
android:textColor="#222222"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:gravity="end"
|
||||
android:maxWidth="171dp"
|
||||
android:text="张三·13998098767"
|
||||
android:textColor="#666666"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="21dp"
|
||||
android:layout_height="21dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_device_detail_time" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="@string/device_detail_label_activation_time"
|
||||
android:textColor="#222222"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:gravity="end"
|
||||
android:maxWidth="171dp"
|
||||
android:text="2026-10-13 21:54:36"
|
||||
android:textColor="#666666"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="21dp"
|
||||
android:layout_height="21dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_device_detail_location" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="@string/device_detail_label_location"
|
||||
android:textColor="#222222"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:gravity="end"
|
||||
android:lineSpacingExtra="0.6dp"
|
||||
android:maxWidth="171dp"
|
||||
android:text="上海市浦东新区 世纪大道 100 号"
|
||||
android:textColor="#666666"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="25dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="21dp"
|
||||
android:layout_height="21dp"
|
||||
android:contentDescription="@null"
|
||||
android:src="@mipmap/icon_device_detail_runtime" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="@string/device_detail_label_runtime"
|
||||
android:textColor="#222222"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
style="@style/HomeText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:gravity="end"
|
||||
android:maxWidth="171dp"
|
||||
android:text="1268 小时"
|
||||
android:textColor="#666666"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
@@ -309,6 +309,7 @@
|
||||
|
||||
<!-- 在线设备 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/card_online"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="130dp"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
@@ -463,6 +464,7 @@
|
||||
|
||||
<!-- 故障设备 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/card_fault"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="130dp"
|
||||
android:layout_marginStart="24dp"
|
||||
@@ -619,6 +621,7 @@
|
||||
|
||||
<!-- 离线设备:整张卡片弱化 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/card_offline"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="130dp"
|
||||
android:layout_marginStart="24dp"
|
||||
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
BIN
app/src/main/res/mipmap-xhdpi/icon_device_detail_location.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
app/src/main/res/mipmap-xhdpi/icon_device_detail_model.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
app/src/main/res/mipmap-xhdpi/icon_device_detail_owner.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
app/src/main/res/mipmap-xhdpi/icon_device_detail_runtime.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
app/src/main/res/mipmap-xhdpi/icon_device_detail_sn.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
app/src/main/res/mipmap-xhdpi/icon_device_detail_time.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
app/src/main/res/mipmap-xhdpi/icon_device_detail_user.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/icon_device_detail_location.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/icon_device_detail_model.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/icon_device_detail_owner.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/icon_device_detail_runtime.png
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/icon_device_detail_sn.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/icon_device_detail_time.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/icon_device_detail_user.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/icon_device_detail_location.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/icon_device_detail_model.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/icon_device_detail_owner.png
Normal file
|
After Width: | Height: | Size: 894 B |
BIN
app/src/main/res/mipmap-xxxhdpi/icon_device_detail_runtime.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/icon_device_detail_sn.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/icon_device_detail_time.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/icon_device_detail_user.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
17
app/src/main/res/values-en/device_detail_strings.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="device_detail_title">Device Details</string>
|
||||
<string name="device_detail_section_info">Device Info</string>
|
||||
<string name="device_detail_label_sn">Device SN</string>
|
||||
<string name="device_detail_label_model">Device Model</string>
|
||||
<string name="device_detail_label_owner">Owner Unit</string>
|
||||
<string name="device_detail_label_user">Linked User</string>
|
||||
<string name="device_detail_label_activation_time">Activation Time</string>
|
||||
<string name="device_detail_label_location">Activation Location</string>
|
||||
<string name="device_detail_label_runtime">Total Runtime</string>
|
||||
|
||||
<string name="device_detail_banner_online">Device running normally, signal good · Last online: Just now</string>
|
||||
<string name="device_detail_banner_fault">E04 Overheat Protection | Temperature > 260°C · Auto power-off activated</string>
|
||||
<string name="device_detail_banner_fault_time">Triggered 2024-05-18 14:32 · Lasted 2h 18m</string>
|
||||
<string name="device_detail_banner_offline">Last online 2024-05-20 08:12 · Offline for 6 hours. Data will auto-update when device reconnects</string>
|
||||
</resources>
|
||||
17
app/src/main/res/values/device_detail_strings.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="device_detail_title">设备详情</string>
|
||||
<string name="device_detail_section_info">设备信息</string>
|
||||
<string name="device_detail_label_sn">设备 SN</string>
|
||||
<string name="device_detail_label_model">设备型号</string>
|
||||
<string name="device_detail_label_owner">所属单位</string>
|
||||
<string name="device_detail_label_user">关联用户</string>
|
||||
<string name="device_detail_label_activation_time">激活时间</string>
|
||||
<string name="device_detail_label_location">激活位置</string>
|
||||
<string name="device_detail_label_runtime">累计运行</string>
|
||||
|
||||
<string name="device_detail_banner_online">设备运行正常,信号良好 ·\n最近在线:刚刚</string>
|
||||
<string name="device_detail_banner_fault">E04 过热保护 | 温度 > 260°C・\n已自动断电</string>
|
||||
<string name="device_detail_banner_fault_time">触发时间 2024-05-18 14:32 ・持续 2 小时 18 分</string>
|
||||
<string name="device_detail_banner_offline">最近在线 2024-05-20 08:12 ・已离线 6 小时。设备重新连接后数据将自动更新</string>
|
||||
</resources>
|
||||
@@ -4,4 +4,6 @@
|
||||
<color name="device_manage_text_primary">#222222</color>
|
||||
<color name="device_manage_text_secondary">#666666</color>
|
||||
<color name="device_manage_text_tertiary">#999999</color>
|
||||
<color name="device_manage_status_online">#22A45D</color>
|
||||
<color name="device_manage_status_fault">#E5484D</color>
|
||||
</resources>
|
||||
|
||||