feat: 开始组装 ui
This commit is contained in:
BIN
module_gjc/src/main/res/drawable/ic_success_circle.png
Normal file
BIN
module_gjc/src/main/res/drawable/ic_success_circle.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
@@ -73,11 +73,12 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请输入组装人"}'
|
||||
type="@{SearchLayoutType.INPUT}"
|
||||
hint='@{"请选择组装人"}'
|
||||
list="@{viewModel.assemblerList}"
|
||||
type="@{SearchLayoutType.SPINNER}"
|
||||
value="@={viewModel.assembler}" />
|
||||
|
||||
<!-- 搜索按钮 -->
|
||||
<!-- 操作按钮区 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -85,27 +86,31 @@
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 搜索按钮 -->
|
||||
<ImageView
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:onClick="@{()-> viewModel.searchClick()}"
|
||||
android:padding="2dp"
|
||||
android:src="@drawable/img_search" />
|
||||
|
||||
<!-- 加号按钮 -->
|
||||
<!-- 新增按钮 -->
|
||||
<ImageView
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:onClick="@{()-> viewModel.onAddClick()}"
|
||||
android:src="@drawable/img_add"
|
||||
android:layout_marginLeft="15dp" />
|
||||
android:padding="4dp"
|
||||
android:src="@drawable/img_add" />
|
||||
|
||||
<!-- 删除按钮 -->
|
||||
<ImageView
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:onClick="@{()-> viewModel.onDeleteClick()}"
|
||||
android:src="@drawable/img_delete"
|
||||
android:layout_marginLeft="15dp" />
|
||||
android:padding="4dp"
|
||||
android:src="@drawable/img_delete" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<variable
|
||||
name="bean"
|
||||
type="com.lukouguoji.module_base.bean.AssembleInfoBean" />
|
||||
|
||||
<variable
|
||||
name="position"
|
||||
type="Integer" />
|
||||
@@ -14,23 +18,25 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingVertical="12dp"
|
||||
android:paddingHorizontal="8dp">
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:paddingVertical="6dp">
|
||||
|
||||
<!-- 序号圆圈 -->
|
||||
<TextView
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:background="@drawable/bg_circle_gray"
|
||||
android:gravity="center"
|
||||
android:minWidth="20dp"
|
||||
android:paddingHorizontal="4dp"
|
||||
android:text="@{String.valueOf(position + 1)}"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="@{bean.showIndex ? View.VISIBLE : View.GONE}" />
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="13sp"
|
||||
android:visibility="@{bean.showIndex ? View.VISIBLE : View.GONE}"
|
||||
tools:text="1" />
|
||||
|
||||
<!-- ULD编号 -->
|
||||
<TextView
|
||||
@@ -39,7 +45,7 @@
|
||||
android:layout_weight="1"
|
||||
android:text="@{bean.uldNo}"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="15sp" />
|
||||
android:textSize="14sp" />
|
||||
|
||||
<!-- 重量信息 -->
|
||||
<TextView
|
||||
@@ -48,14 +54,14 @@
|
||||
android:layout_marginStart="12dp"
|
||||
android:text="@{bean.weightInfo}"
|
||||
android:textColor="@{bean.isOrange ? @color/text_orange : @color/colorPrimary}"
|
||||
android:textSize="15sp" />
|
||||
android:textSize="14sp" />
|
||||
|
||||
<!-- 箭头图标 -->
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:src="@drawable/ic_arrow_right"
|
||||
android:src="@drawable/img_pda_right"
|
||||
android:visibility="@{bean.hasArrow ? View.VISIBLE : View.GONE}" />
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<variable
|
||||
name="bean"
|
||||
type="com.lukouguoji.module_base.bean.AssemblePositionBean" />
|
||||
|
||||
<variable
|
||||
name="position"
|
||||
type="Integer" />
|
||||
@@ -14,26 +18,40 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingVertical="12dp"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:background="@{bean.isSelected ? @drawable/bg_green_light : @drawable/bg_white}">
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@{bean.positionName}"
|
||||
android:textColor="@{bean.isSelected ? @color/colorPrimary : @color/text_normal}"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="normal" />
|
||||
android:background="@color/white"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:paddingVertical="12dp">
|
||||
|
||||
<!-- Radio Button 圆形图标 -->
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:src="@{bean.isSelected ? @drawable/ic_success_circle : @drawable/bg_circle_gray}" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@{bean.positionName}"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="normal" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 分割线 -->
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/line" />
|
||||
|
||||
<!-- 选中图标 -->
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/ic_check_green"
|
||||
android:visibility="@{bean.isSelected ? View.VISIBLE : View.GONE}" />
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
|
||||
Reference in New Issue
Block a user