Compare commits
2 Commits
118cf21ea4
...
10384d7b15
| Author | SHA1 | Date |
|---|---|---|
|
|
10384d7b15 | 7 days ago |
|
|
7d1df338fe | 7 days ago |
@ -0,0 +1,79 @@
|
||||
package com.example.tyre.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.example.tyre.BR;
|
||||
import com.example.tyre.R;
|
||||
import com.example.tyre.databinding.ItemCarRecordBinding;
|
||||
import com.example.tyre.entity.CarMaintenanceLifecycleDTO;
|
||||
import com.example.tyre.maintenance.been.CheckInstanceFiles;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2024/3/11
|
||||
*/
|
||||
public class CarRecordAdapter extends RecyclerView.Adapter<CarRecordAdapter.MyViewHolder> {
|
||||
private List<CarMaintenanceLifecycleDTO> list;
|
||||
private static Context context;
|
||||
private LayoutInflater inflater;
|
||||
private ItemClickCall clickCall;
|
||||
|
||||
|
||||
|
||||
|
||||
public CarRecordAdapter(Context context, ItemClickCall clickCall) {
|
||||
this.context = context;
|
||||
this.clickCall = clickCall;
|
||||
inflater = LayoutInflater.from(context);
|
||||
}
|
||||
|
||||
public void setList(List<CarMaintenanceLifecycleDTO> list) {
|
||||
this.list = list;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
ItemCarRecordBinding binding = DataBindingUtil.inflate(inflater, R.layout.item_car_record, parent, false);
|
||||
return new MyViewHolder(binding);
|
||||
}
|
||||
|
||||
// @SuppressLint("CheckResult")
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull MyViewHolder holder, int position) {
|
||||
var item = list.get(position);
|
||||
var binding = holder.binding;
|
||||
binding.setVariable(BR.item, item);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list==null?0:list.size();
|
||||
}
|
||||
|
||||
class MyViewHolder extends RecyclerView.ViewHolder {
|
||||
private ItemCarRecordBinding binding;
|
||||
|
||||
public MyViewHolder(ItemCarRecordBinding binding) {
|
||||
super(binding.getRoot());
|
||||
this.binding = binding;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
public interface ItemClickCall {
|
||||
void onClick(int position);
|
||||
}
|
||||
}
|
||||
@ -1,214 +1,398 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.core.widget.NestedScrollView
|
||||
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:fillViewport="true"
|
||||
android:background="#F0F4F8"> <!-- 浅灰色背景提升质感 -->
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="tire1"
|
||||
type="com.example.tyre.maintenance.been.BaseTyre" />
|
||||
|
||||
<variable
|
||||
name="tire2"
|
||||
type="com.example.tyre.maintenance.been.BaseTyre" />
|
||||
|
||||
<variable
|
||||
name="tire3"
|
||||
type="com.example.tyre.maintenance.been.BaseTyre" />
|
||||
|
||||
<variable
|
||||
name="tire4"
|
||||
type="com.example.tyre.maintenance.been.BaseTyre" />
|
||||
|
||||
<variable
|
||||
name="tire5"
|
||||
type="com.example.tyre.maintenance.been.BaseTyre" />
|
||||
|
||||
<variable
|
||||
name="tire6"
|
||||
type="com.example.tyre.maintenance.been.BaseTyre" />
|
||||
|
||||
<variable
|
||||
name="adapter"
|
||||
type="com.example.tyre.adapter.CarRecordAdapter" />
|
||||
|
||||
</data>
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="12dp">
|
||||
android:layout_height="match_parent"
|
||||
android:background="#F0F4F8"
|
||||
android:fillViewport="true"> <!-- 浅灰色背景提升质感 -->
|
||||
|
||||
<!-- 顶部:搜索卡片 -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/card_search"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="4dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="12dp">
|
||||
|
||||
<!-- 顶部:搜索卡片 -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/card_search"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="4dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="24dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:text="公交车轮胎管理"
|
||||
android:textColor="#202020"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<!-- 车牌号输入 -->
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/til_plate_number"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:hint="请输入车牌号"
|
||||
app:endIconDrawable="@mipmap/search_icon"
|
||||
app:endIconMode="custom">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/et_plate_number"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="number"
|
||||
android:maxLines="1" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_retrieve"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="立即检索"
|
||||
android:textSize="16sp"
|
||||
app:cornerRadius="8dp" />
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="24dp">
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:background="@drawable/card_bg"
|
||||
android:padding="12dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="公交车轮胎管理"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="车辆最新里程:"
|
||||
android:textColor="#202020"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginBottom="20dp"/>
|
||||
|
||||
<!-- 车牌号输入 -->
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/til_plate_number"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="请输入车牌号"
|
||||
android:layout_marginBottom="16dp"
|
||||
app:endIconMode="custom"
|
||||
app:endIconDrawable="@mipmap/search_icon">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/et_plate_number"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="number"
|
||||
android:maxLines="1" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_retrieve"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="立即检索"
|
||||
android:textSize="16sp"
|
||||
app:cornerRadius="8dp" />
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/select_info_mileage"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="0"
|
||||
android:textColor="#202020"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- 底部:三轴轮位图展示区 -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/card_visual"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="16dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="2dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/card_search"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<!-- 底部:三轴轮位图展示区 -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/card_visual"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="16dp">
|
||||
android:layout_marginTop="16dp"
|
||||
android:visibility="gone"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="2dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/card_search">
|
||||
|
||||
<!-- 辅助线:垂直中心线 (分隔左右轮胎) -->
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline_vertical_center"
|
||||
android:layout_width="wrap_content"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="16dp">
|
||||
|
||||
<!-- 辅助线:垂直中心线 (分隔左右轮胎) -->
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline_vertical_center"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.5" />
|
||||
|
||||
<!-- 辅助线:水平线 1 (第1轴位置) -->
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline_axis_1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_begin="96dp" />
|
||||
|
||||
<!-- 辅助线:水平线 2 (第2轴位置) -->
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline_axis_2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_end="235dp" />
|
||||
|
||||
<!-- 辅助线:水平线 3 (第3轴位置) -->
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline_axis_3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_begin="399dp" />
|
||||
|
||||
<!-- 车头指示 -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="🚗 车头方向"
|
||||
android:textColor="#999999"
|
||||
android:textSize="10sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<!-- ================= 第1轴 (前轴) ================= -->
|
||||
<!-- 左侧轮胎 (1轴) -->
|
||||
<include
|
||||
android:id="@+id/tire_left_front"
|
||||
layout="@layout/item_tire"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="120dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/guideline_axis_1"
|
||||
app:layout_constraintEnd_toStartOf="@id/guideline_vertical_center"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/guideline_axis_1" />
|
||||
|
||||
<!-- 右侧轮胎 (1轴) -->
|
||||
|
||||
<!-- ================= 第2轴 (中轴) ================= -->
|
||||
<!-- 左侧轮胎 (2轴) -->
|
||||
|
||||
<include
|
||||
android:id="@+id/tire_right_front"
|
||||
layout="@layout/item_tire"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="120dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/guideline_axis_1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toEndOf="@id/guideline_vertical_center"
|
||||
app:layout_constraintTop_toTopOf="@id/guideline_axis_1" />
|
||||
|
||||
<include
|
||||
android:id="@+id/tire_middle_left"
|
||||
layout="@layout/item_tire"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="120dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/guideline_axis_2"
|
||||
app:layout_constraintEnd_toStartOf="@id/guideline_vertical_center"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/guideline_axis_2" />
|
||||
|
||||
<!-- 右侧轮胎 (2轴) -->
|
||||
<include
|
||||
android:id="@+id/tire_middle_right"
|
||||
layout="@layout/item_tire"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="120dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/guideline_axis_2"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@id/guideline_vertical_center"
|
||||
app:layout_constraintTop_toTopOf="@id/guideline_axis_2" />
|
||||
|
||||
<!-- ================= 第3轴 (后轴) ================= -->
|
||||
<!-- 左侧轮胎 (3轴) -->
|
||||
<include
|
||||
android:id="@+id/tire_bottom_left"
|
||||
layout="@layout/item_tire"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="120dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/guideline_axis_3"
|
||||
app:layout_constraintEnd_toStartOf="@id/guideline_vertical_center"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/guideline_axis_3" />
|
||||
|
||||
<!-- 右侧轮胎 (3轴) -->
|
||||
<include
|
||||
android:id="@+id/tire_bottom_right"
|
||||
layout="@layout/item_tire"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="120dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/guideline_axis_3"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@id/guideline_vertical_center"
|
||||
app:layout_constraintTop_toTopOf="@id/guideline_axis_3" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/layout_card_style"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.5" />
|
||||
android:gravity="center">
|
||||
|
||||
<!-- 辅助线:水平线 1 (第1轴位置) -->
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline_axis_1"
|
||||
android:layout_width="wrap_content"
|
||||
<include
|
||||
android:id="@+id/tireClick1"
|
||||
layout="@layout/layout_trae_info"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:data="@{tire1}"
|
||||
app:locationOld='@{"左前轮"}' />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="3dp"
|
||||
android:layout_weight="1"
|
||||
android:background="#E3E6EC" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:background="@drawable/bg_grey"
|
||||
android:gravity="center"
|
||||
android:text="1"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="3dp"
|
||||
android:layout_weight="1"
|
||||
android:background="#E3E6EC" />
|
||||
|
||||
|
||||
<include
|
||||
android:id="@+id/tireClick2"
|
||||
layout="@layout/layout_trae_info"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:data="@{tire2}"
|
||||
app:locationOld='@{"右前轮"}' />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_begin="96dp" />
|
||||
android:layout_marginTop="8dp"
|
||||
android:gravity="center">
|
||||
|
||||
<!-- 辅助线:水平线 2 (第2轴位置) -->
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline_axis_2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_begin="241dp" />
|
||||
<include
|
||||
android:id="@+id/tireClick3"
|
||||
layout="@layout/layout_trae_info"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:data="@{tire3}"
|
||||
app:locationOld='@{"左外轮"}' />
|
||||
|
||||
<!-- 辅助线:水平线 3 (第3轴位置) -->
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline_axis_3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_begin="399dp" />
|
||||
<include
|
||||
android:id="@+id/tireClick4"
|
||||
layout="@layout/layout_trae_info"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
app:data="@{tire4}"
|
||||
app:locationOld='@{"左内轮"}' />
|
||||
|
||||
<!-- 车头指示 -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="🚗 车头方向"
|
||||
android:textColor="#999999"
|
||||
android:textSize="10sp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="3dp"
|
||||
android:layout_weight="1"
|
||||
android:background="#E3E6EC" />
|
||||
|
||||
<!-- ================= 第1轴 (前轴) ================= -->
|
||||
<!-- 左侧轮胎 (1轴) -->
|
||||
<include
|
||||
android:id="@+id/tire_left_front"
|
||||
layout="@layout/item_tire"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="120dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/guideline_axis_1"
|
||||
app:layout_constraintEnd_toStartOf="@id/guideline_vertical_center"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/guideline_axis_1" />
|
||||
<TextView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:background="@drawable/bg_grey"
|
||||
android:gravity="center"
|
||||
android:text="2"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<!-- 右侧轮胎 (1轴) -->
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="3dp"
|
||||
android:layout_weight="1"
|
||||
android:background="#E3E6EC" />
|
||||
|
||||
<!-- ================= 第2轴 (中轴) ================= -->
|
||||
<!-- 左侧轮胎 (2轴) -->
|
||||
|
||||
<include
|
||||
android:id="@+id/tire_right_front"
|
||||
layout="@layout/item_tire"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="120dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/guideline_axis_1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toEndOf="@id/guideline_vertical_center"
|
||||
app:layout_constraintTop_toTopOf="@id/guideline_axis_1" />
|
||||
<include
|
||||
android:id="@+id/tireClick5"
|
||||
layout="@layout/layout_trae_info"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:data="@{tire5}"
|
||||
app:locationOld='@{"右内轮"}' />
|
||||
|
||||
<include
|
||||
android:id="@+id/tire_middle_left"
|
||||
layout="@layout/item_tire"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="120dp"
|
||||
app:layout_constraintTop_toTopOf="@id/guideline_axis_2"
|
||||
app:layout_constraintBottom_toBottomOf="@id/guideline_axis_2"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/guideline_vertical_center"
|
||||
app:layout_constraintHorizontal_bias="0.5" />
|
||||
<include
|
||||
android:id="@+id/tireClick6"
|
||||
layout="@layout/layout_trae_info"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
app:data="@{tire6}"
|
||||
app:locationOld='@{"右外轮"}' />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 右侧轮胎 (2轴) -->
|
||||
<include
|
||||
android:id="@+id/tire_middle_right"
|
||||
layout="@layout/item_tire"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="120dp"
|
||||
app:layout_constraintTop_toTopOf="@id/guideline_axis_2"
|
||||
app:layout_constraintBottom_toBottomOf="@id/guideline_axis_2"
|
||||
app:layout_constraintStart_toEndOf="@id/guideline_vertical_center"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- ================= 第3轴 (后轴) ================= -->
|
||||
<!-- 左侧轮胎 (3轴) -->
|
||||
<include
|
||||
android:id="@+id/tire_bottom_left"
|
||||
layout="@layout/item_tire"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="120dp"
|
||||
app:layout_constraintTop_toTopOf="@id/guideline_axis_3"
|
||||
app:layout_constraintBottom_toBottomOf="@id/guideline_axis_3"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/guideline_vertical_center"
|
||||
app:layout_constraintHorizontal_bias="0.5" />
|
||||
|
||||
<!-- 右侧轮胎 (3轴) -->
|
||||
<include
|
||||
android:id="@+id/tire_bottom_right"
|
||||
layout="@layout/item_tire"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="120dp"
|
||||
app:layout_constraintTop_toTopOf="@id/guideline_axis_3"
|
||||
app:layout_constraintBottom_toBottomOf="@id/guideline_axis_3"
|
||||
app:layout_constraintStart_toEndOf="@id/guideline_vertical_center"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="400dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:adapter="@{adapter}"
|
||||
android:background="@drawable/card_bg"
|
||||
android:padding="8dp"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</layout>
|
||||
Loading…
Reference in New Issue