feat(layout): 更新秤数据列表项布局样式
- 将布局高度从120dp增加到340dp - 调整布局方向为垂直排列并居中对齐 - 添加商品名称显示文本框 - 调整字体大小和颜色配置 - 修改权重布局为包裹内容模式 - 更新内边距设置以优化显示效果
This commit is contained in:
@@ -1,48 +1,52 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?><!-- 单行秤数据:秤编号 + 重量 + 状态 -->
|
||||||
<!-- 单行秤数据:秤编号 + 重量 + 状态 -->
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="120dp"
|
android:layout_height="340dp"
|
||||||
android:orientation="horizontal"
|
android:background="@drawable/shape_scale_cell"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center"
|
||||||
|
android:orientation="vertical"
|
||||||
android:paddingStart="16dp"
|
android:paddingStart="16dp"
|
||||||
android:paddingEnd="16dp"
|
|
||||||
android:paddingTop="8dp"
|
android:paddingTop="8dp"
|
||||||
android:paddingBottom="8dp"
|
android:paddingEnd="16dp"
|
||||||
android:background="@drawable/shape_scale_cell">
|
android:paddingBottom="8dp">
|
||||||
|
|
||||||
<!-- 秤编号 -->
|
<!-- 秤编号 -->
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvScaleLabel"
|
android:id="@+id/tvScaleLabel"
|
||||||
android:layout_width="0dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
|
||||||
android:textSize="22sp"
|
|
||||||
android:textColor="@color/home_sub_title"
|
android:textColor="@color/home_sub_title"
|
||||||
|
android:textSize="18sp"
|
||||||
tools:text="秤 1" />
|
tools:text="秤 1" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvName"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="@color/home_sub_title"
|
||||||
|
android:textSize="22sp"
|
||||||
|
android:text="油" />
|
||||||
|
|
||||||
<!-- 重量 -->
|
<!-- 重量 -->
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvWeight"
|
android:id="@+id/tvWeight"
|
||||||
android:layout_width="0dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="2"
|
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
android:textColor="@color/home_title"
|
||||||
android:textSize="26sp"
|
android:textSize="26sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:textColor="@color/home_title"
|
|
||||||
tools:text="235.5 g" />
|
tools:text="235.5 g" />
|
||||||
|
|
||||||
<!-- 状态 -->
|
<!-- 状态 -->
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvState"
|
android:id="@+id/tvState"
|
||||||
android:layout_width="0dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
|
||||||
android:gravity="end"
|
android:gravity="end"
|
||||||
android:textSize="18sp"
|
|
||||||
android:textColor="@color/home_sub_title"
|
android:textColor="@color/home_sub_title"
|
||||||
|
android:textSize="18sp"
|
||||||
tools:text="稳定" />
|
tools:text="稳定" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
Reference in New Issue
Block a user