From 2b446a5fd5d8f9b8c0f1e3acef1eef7ad9adb6f9 Mon Sep 17 00:00:00 2001
From: tj <1378534974@qq.com>
Date: 星期三, 09 四月 2025 10:25:27 +0800
Subject: [PATCH] 1.1
---
app/src/main/java/com/example/firstapp/adapter/PackageAdapter.kt | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/app/src/main/java/com/example/firstapp/adapter/PackageAdapter.kt b/app/src/main/java/com/example/firstapp/adapter/PackageAdapter.kt
index 21edc63..dc3df25 100644
--- a/app/src/main/java/com/example/firstapp/adapter/PackageAdapter.kt
+++ b/app/src/main/java/com/example/firstapp/adapter/PackageAdapter.kt
@@ -45,13 +45,13 @@
fun bind(code: Code) {
// imgCourier.setImageResource(code.category)
- textCourierName.text = code.type
+ textCourierName.text = code.oneLevel
textTrackingNumber.text = code.code
// 步骤1:定义解析器,将字符串转为 Date
val parser = SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault())
val formatter = SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.getDefault())
try {
- val date: Date? = parser.parse(code.createtime) // 解析字符串
+ val date: Date? = parser.parse(code.createTime) // 解析字符串
date?.let {
textTime.text = "到货:"+formatter.format(it) // 格式化并赋值
} ?: run {
@@ -63,7 +63,7 @@
textTime.text = "Format Error"
}
try {
- val date2: Date? = parser.parse(code.pickuptime) // 解析字符串
+ val date2: Date? = parser.parse(code.pickupTime) // 解析字符串
date2?.let {
textPickTime.text = "取件:"+formatter.format(it) // 格式化并赋值
} ?: run {
--
Gitblit v1.9.3