| | |
| | | private val textPickTime: TextView = view.findViewById(R.id.text_pick_time) |
| | | |
| | | fun bind(code: Code) { |
| | | |
| | | textTime.textSize=10f |
| | | textPickTime.textSize=10f |
| | | |
| | | // imgCourier.setImageResource(code.category) |
| | | textCourierName.text = code.oneLevel |
| | | textTrackingNumber.text = code.code |
| | |
| | | try { |
| | | val date: Date? = parser.parse(code.createTime) // 解析字符串 |
| | | date?.let { |
| | | textTime.text = "到货:"+formatter.format(it) // 格式化并赋值 |
| | | textTime.text = "到货:"+formatter.format(it) // 格式化并赋值 |
| | | } ?: run { |
| | | // 处理解析失败(date 为 null 的情况) |
| | | textTime.text = "Invalid Date" |