增加左上角点击关闭页面,增加启动网络检测和连接功能,删除手机端测试布局;
This commit is contained in:
@@ -5,39 +5,34 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:fitsSystemWindows="false"
|
||||
tools:background="@color/bg_page">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/flStatusBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp">
|
||||
<!-- android:paddingTop="9dp"-->
|
||||
android:layout_height="68dp"
|
||||
android:paddingStart="25dp"
|
||||
android:paddingEnd="25dp"
|
||||
android:paddingTop="25dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_left_status"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/white"
|
||||
android:layout_gravity="start"
|
||||
android:textSize="12sp"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:textSize="24sp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
tools:text="1-1冷藏柜 -2°C / 87%" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_right_status"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/white"
|
||||
android:layout_gravity="end"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:textSize="12sp"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:textSize="24sp"
|
||||
tools:text="6月22日 星期日 15:26:33" />
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||
app:spanCount="2"
|
||||
android:overScrollMode="never"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
tools:listitem="@layout/list_item_shelf"/>
|
||||
|
||||
|
||||
@@ -24,12 +24,4 @@
|
||||
android:layout_height="match_parent"
|
||||
layout="@layout/layout_empty_view"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<!-- <include-->
|
||||
<!-- android:id="@+id/includeLight"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- layout="@layout/layout_light_switch"-->
|
||||
<!-- android:visibility="gone"/>-->
|
||||
|
||||
</FrameLayout>
|
||||
@@ -1,48 +1,145 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="225dp"
|
||||
android:layout_height="215dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="75dp"
|
||||
android:src="@drawable/img_init"
|
||||
tools:ignore="ContentDescription"
|
||||
android:visibility="invisible"/>
|
||||
<LinearLayout
|
||||
android:id="@+id/llDeviceInit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btnInit"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="50dp"
|
||||
android:background="@drawable/bg_init_button"
|
||||
android:gravity="center"
|
||||
android:padding="10dp"
|
||||
android:text="设备初始化"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="visible"
|
||||
tools:ignore="HardcodedText" />
|
||||
<ImageView
|
||||
android:layout_width="450dp"
|
||||
android:layout_height="430dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="150dp"
|
||||
android:src="@drawable/img_init"
|
||||
tools:ignore="ContentDescription"
|
||||
android:visibility="invisible"/>
|
||||
|
||||
<Space
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
<TextView
|
||||
android:id="@+id/btnInit"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="100dp"
|
||||
android:background="@drawable/bg_init_button"
|
||||
android:gravity="center"
|
||||
android:padding="10dp"
|
||||
android:text="设备初始化"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="30sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="visible"
|
||||
tools:ignore="HardcodedText" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivQrCode"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_gravity="center_horizontal|bottom"
|
||||
android:layout_marginBottom="25dp"
|
||||
tools:ignore="ContentDescription"
|
||||
tools:src="@mipmap/ic_logo512" />
|
||||
<Space
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
<ImageView
|
||||
android:id="@+id/ivQrCode"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="200dp"
|
||||
android:layout_gravity="center_horizontal|bottom"
|
||||
android:layout_marginBottom="50dp"
|
||||
tools:ignore="ContentDescription"
|
||||
tools:src="@mipmap/ic_logo512" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/llNetwork"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center">
|
||||
|
||||
<!-- Loading 动画容器 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/llLoading"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:visibility="visible"
|
||||
android:layout_marginTop="260dp">
|
||||
|
||||
<!-- 加载动画 -->
|
||||
<ImageView
|
||||
android:id="@+id/ivLoading"
|
||||
android:layout_width="160dp"
|
||||
android:layout_height="160dp"
|
||||
android:src="@drawable/loading_spinner"
|
||||
android:contentDescription="加载中" />
|
||||
|
||||
<!-- 倒计时文字 -->
|
||||
<TextView
|
||||
android:id="@+id/tvCountdown"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="60秒"
|
||||
android:textSize="40sp"
|
||||
android:textColor="@color/black"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginTop="50dp" />
|
||||
|
||||
<!-- 提示文字 -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="网络连接检测中,请稍后……"
|
||||
android:textSize="22sp"
|
||||
android:textColor="#555555"
|
||||
android:layout_marginTop="20dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 连接网络按钮容器 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/llNetworkButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:visibility="gone">
|
||||
|
||||
<!-- 网络错误图标 -->
|
||||
<ImageView
|
||||
android:layout_width="140dp"
|
||||
android:layout_height="140dp"
|
||||
android:src="@drawable/ic_network_error"
|
||||
android:contentDescription="网络连接失败"
|
||||
android:layout_marginBottom="30dp" />
|
||||
|
||||
<!-- 连接失败提示 -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="网络连接失败"
|
||||
android:textSize="36sp"
|
||||
android:textColor="@color/black"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginBottom="40dp" />
|
||||
|
||||
<!-- 连接网络按钮 -->
|
||||
<Button
|
||||
android:id="@+id/btnConnectNetwork"
|
||||
android:layout_width="350dp"
|
||||
android:layout_height="70dp"
|
||||
android:text="连接网络"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@android:color/white"
|
||||
android:background="@drawable/btn_connect_network" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
@@ -33,8 +33,8 @@
|
||||
android:id="@+id/btnFind"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:textSize="12sp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:textSize="18sp"
|
||||
android:layout_gravity="end|center_vertical"
|
||||
android:text="查找1001指令"/>
|
||||
</FrameLayout>
|
||||
|
||||
@@ -1,111 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:background="@color/bg_page">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="260dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
app:cardBackgroundColor="@color/white"
|
||||
app:cardCornerRadius="6dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="10dp">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivBack"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="top|start"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:src="@drawable/ic_back_512"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="28sp"
|
||||
android:layout_gravity="center"
|
||||
android:text="设置"
|
||||
android:textColor="@color/black"/>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<!-- <EditText-->
|
||||
<!-- android:id="@+id/etInputCmdPrefix"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="60dp"-->
|
||||
<!-- android:hint="请输入命令"-->
|
||||
<!-- android:maxLines="1"-->
|
||||
<!-- android:text=""-->
|
||||
<!-- android:textSize="22sp" />-->
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etInputCmd"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:hint="请输入命令内容"
|
||||
android:maxLines="1"
|
||||
android:textSize="22sp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnSendCmd"
|
||||
android:layout_width="180dp"
|
||||
android:layout_height="60dp"
|
||||
android:textSize="22sp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="30dp"
|
||||
android:text="发送命令" />
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
app:cardBackgroundColor="@color/white"
|
||||
app:cardCornerRadius="6dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="10dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCmdRecord"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:textSize="20sp"
|
||||
android:text=""/>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -9,12 +9,12 @@
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="190dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_height="376dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
app:cardBackgroundColor="@color/white"
|
||||
app:cardCornerRadius="6dp"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<FrameLayout
|
||||
@@ -25,20 +25,20 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvShelfName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/bg_page"
|
||||
android:textSize="15sp"
|
||||
android:textSize="30sp"
|
||||
tools:text="货架 - 03" />
|
||||
|
||||
<Space
|
||||
@@ -54,7 +54,7 @@
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/food_weight_orange"
|
||||
android:textSize="30sp"
|
||||
android:textSize="60sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="1506克" />
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/food_name_black"
|
||||
android:textSize="18sp"
|
||||
android:textSize="36sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="金针菇" />
|
||||
|
||||
@@ -82,11 +82,11 @@
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnClearZero"
|
||||
android:layout_width="65dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_gravity="top|end"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:backgroundTint="@color/bg_page"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
@@ -95,21 +95,20 @@
|
||||
android:maxLines="1"
|
||||
android:text="清零"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"
|
||||
app:cornerRadius="6dp"
|
||||
android:textSize="30sp"
|
||||
app:cornerRadius="12dp"
|
||||
app:elevation="0dp"
|
||||
tools:ignore="HardcodedText" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivBack"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_gravity="top|start"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:src="@drawable/ic_back_512"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
@@ -117,12 +116,12 @@
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:layout_marginBottom="24dp"
|
||||
app:cardBackgroundColor="@color/white"
|
||||
app:cardCornerRadius="6dp"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<LinearLayout
|
||||
@@ -132,26 +131,26 @@
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_height="80dp"
|
||||
android:layout_marginStart="48dp"
|
||||
android:layout_marginTop="48dp"
|
||||
android:layout_marginEnd="48dp"
|
||||
android:background="@drawable/shape_search"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:src="@drawable/ic_search_food" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etInputFood"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:background="@null"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:hint="输入食材名称"
|
||||
@@ -163,14 +162,14 @@
|
||||
android:text=""
|
||||
android:textColor="@color/food_name_black"
|
||||
android:textColorHint="#B4BEC8"
|
||||
android:textSize="15sp"
|
||||
android:textSize="30sp"
|
||||
tools:ignore="Autofill,HardcodedText,TextFields" />
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
||||
@@ -188,10 +187,10 @@
|
||||
android:layout_height="match_parent"
|
||||
android:clipToPadding="false"
|
||||
android:overScrollMode="never"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:paddingStart="36dp"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingEnd="36dp"
|
||||
android:paddingBottom="12dp"
|
||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||
app:spanCount="2"
|
||||
tools:itemCount="10"
|
||||
@@ -209,23 +208,24 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical">
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnClearEmpty"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="80dp"
|
||||
android:layout_marginStart="48dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:backgroundTint="@color/bg_page"
|
||||
android:ellipsize="end"
|
||||
android:insetTop="0dp"
|
||||
@@ -233,22 +233,21 @@
|
||||
android:maxLines="1"
|
||||
android:text="清空"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"
|
||||
android:textSize="30sp"
|
||||
android:textStyle="bold"
|
||||
app:cornerRadius="6dp"
|
||||
app:cornerRadius="12dp"
|
||||
app:elevation="0dp"
|
||||
tools:ignore="HardcodedText" />
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnConfirm"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="80dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_marginEnd="48dp"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:backgroundTint="@color/bg_page"
|
||||
android:ellipsize="end"
|
||||
android:insetTop="0dp"
|
||||
@@ -256,11 +255,12 @@
|
||||
android:maxLines="1"
|
||||
android:text="确定"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"
|
||||
android:textSize="30sp"
|
||||
android:textStyle="bold"
|
||||
app:cornerRadius="6dp"
|
||||
app:cornerRadius="12dp"
|
||||
app:elevation="0dp"
|
||||
tools:ignore="HardcodedText" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -11,12 +11,12 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingTop="6dp"
|
||||
android:paddingBottom="6dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingStart="25dp"
|
||||
android:paddingTop="13dp"
|
||||
android:paddingBottom="13dp"
|
||||
android:paddingEnd="25dp"
|
||||
android:textColor="@color/white_f6"
|
||||
android:textSize="16sp"
|
||||
android:textSize="32sp"
|
||||
tools:text="暂无数据" />
|
||||
|
||||
</FrameLayout>
|
||||
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="400dp"
|
||||
android:layout_height="300dp"
|
||||
app:cardCornerRadius="10dp"
|
||||
app:cardElevation="0dp"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
app:cardBackgroundColor="@color/white">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginVertical="30dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvDialogTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="22sp"
|
||||
tools:text="标题"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvDialogContent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:textColor="@color/black"
|
||||
android:gravity="center"
|
||||
android:layout_marginHorizontal="50dp"
|
||||
android:textSize="16sp"
|
||||
tools:text="内容"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/btnConfirm"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="50dp"
|
||||
android:text="确定"
|
||||
android:background="@color/bg_card_blue"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp"
|
||||
android:layout_gravity="center_horizontal"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
@@ -5,25 +5,25 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:background="@drawable/shape_dialog_small"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:background="@drawable/shape_dialog"
|
||||
tools:ignore="MissingDefaultResource">
|
||||
|
||||
<ProgressBar
|
||||
android:layout_width="26dp"
|
||||
android:layout_height="26dp"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:indeterminateTint="@color/white_f6" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvMessage"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:text="加载中……"
|
||||
android:textColor="@color/white_f6"
|
||||
android:textSize="14sp"
|
||||
android:textSize="26sp"
|
||||
tools:ignore="HardcodedText" />
|
||||
</LinearLayout>
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivEmptyIcon"
|
||||
android:layout_width="120dp"
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_empty_gray"
|
||||
android:adjustViewBounds="true"
|
||||
@@ -21,8 +21,8 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/black999"
|
||||
android:layout_marginTop="20dp"
|
||||
android:textSize="20sp"
|
||||
android:layout_marginTop="50dp"
|
||||
android:textSize="50sp"
|
||||
android:text="暂无数据"
|
||||
tools:ignore="HardcodedText" />
|
||||
</LinearLayout>
|
||||
@@ -1,126 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#DDFFFFFF">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivLightHide"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginVertical="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_gravity="end|center_vertical"
|
||||
android:src="@drawable/close"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="80dp"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="20sp"
|
||||
android:text="继电器1"
|
||||
android:layout_marginStart="50dp"
|
||||
android:textColor="@color/black"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btnLightOpen"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="20sp"
|
||||
android:text="开"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/bg_init_button"
|
||||
android:layout_marginStart="50dp"
|
||||
android:textColor="@color/black"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btnLightClose"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="20sp"
|
||||
android:text="关"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/bg_init_button"
|
||||
android:layout_marginStart="50dp"
|
||||
android:textColor="@color/black"/>
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="80dp"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="20sp"
|
||||
android:text="继电器2"
|
||||
android:layout_marginStart="50dp"
|
||||
android:textColor="@color/black"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btnLightOpen2"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="20sp"
|
||||
android:text="开"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/bg_init_button"
|
||||
android:layout_marginStart="50dp"
|
||||
android:textColor="@color/black"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btnLightClose2"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="20sp"
|
||||
android:text="关"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/bg_init_button"
|
||||
android:layout_marginStart="50dp"
|
||||
android:textColor="@color/black"/>
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="80dp"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="20sp"
|
||||
android:text="继电器3"
|
||||
android:layout_marginStart="50dp"
|
||||
android:textColor="@color/black"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btnLightOpen3"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="20sp"
|
||||
android:text="开"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/bg_init_button"
|
||||
android:layout_marginStart="50dp"
|
||||
android:textColor="@color/black"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btnLightClose3"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="20sp"
|
||||
android:text="关"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/bg_init_button"
|
||||
android:layout_marginStart="50dp"
|
||||
android:textColor="@color/black"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,4 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"-->
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"-->
|
||||
<!-- xmlns:tools="http://schemas.android.com/tools"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="80dp"-->
|
||||
@@ -25,23 +26,23 @@
|
||||
android:id="@+id/btnFoodName"
|
||||
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_margin="6dp"
|
||||
android:layout_height="80dp"
|
||||
android:layout_margin="12dp"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:gravity="center"
|
||||
android:insetTop="0dp"
|
||||
android:insetBottom="0dp"
|
||||
android:maxLines="1"
|
||||
app:paddingStart="5dp"
|
||||
app:paddingEnd="5dp"
|
||||
android:insetRight="0dp"
|
||||
android:insetLeft="0dp"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:textColor="@color/black999"
|
||||
android:textSize="15sp"
|
||||
app:cornerRadius="6dp"
|
||||
app:strokeWidth="1dp"
|
||||
tools:text="土豆丝土豆丝土豆丝土豆丝土豆丝土豆丝" />
|
||||
<!-- android:paddingHorizontal="2dp"-->
|
||||
<!-- android:paddingLeft="5dp"-->
|
||||
<!-- android:paddingRight="5dp"-->
|
||||
android:textSize="30sp"
|
||||
app:cornerRadius="12dp"
|
||||
app:strokeWidth="2dp"
|
||||
tools:text="土豆丝土豆丝土豆丝土豆丝土豆丝土豆丝"
|
||||
/>
|
||||
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/layoutCard"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="140dp"
|
||||
android:layout_margin="6dp"
|
||||
android:layout_height="216dp"
|
||||
android:layout_margin="12dp"
|
||||
app:cardBackgroundColor="@color/bg_card_blue"
|
||||
app:cardCornerRadius="6dp"
|
||||
app:cardElevation="2dp"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="0dp"
|
||||
app:rippleColor="#B0BEC5">
|
||||
|
||||
<LinearLayout
|
||||
@@ -16,14 +16,14 @@
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:padding="12dp">
|
||||
android:padding="24dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvShelfName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/shelf_name_white"
|
||||
android:textSize="12sp"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="货架-01" />
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
android:textSize="30sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="空" />
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/food_weight_blue"
|
||||
android:textSize="14sp"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="0千克" />
|
||||
|
||||
@@ -71,14 +71,14 @@
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/food_weight_blue"
|
||||
android:textSize="12sp"
|
||||
android:textSize="18sp"
|
||||
tools:text="-" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivStaleFood"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:src="@drawable/ic_stale_food_512"
|
||||
android:layout_gravity="top|end"
|
||||
tools:ignore="ContentDescription"
|
||||
|
||||
Reference in New Issue
Block a user