增加左上角点击关闭页面,增加启动网络检测和连接功能,删除手机端测试布局;
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user