From c303346ae803dc2a89ec0f025192773211861915 Mon Sep 17 00:00:00 2001 From: lmw <125975490@qq.com> Date: 星期二, 16 七月 2024 14:46:28 +0800 Subject: [PATCH] fix bug --- app/src/main/java/com/dollearn/student/ui/welfare/GoodsDetailActivity.kt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/app/src/main/java/com/dollearn/student/ui/welfare/GoodsDetailActivity.kt b/app/src/main/java/com/dollearn/student/ui/welfare/GoodsDetailActivity.kt index 77a5825..d2b340c 100644 --- a/app/src/main/java/com/dollearn/student/ui/welfare/GoodsDetailActivity.kt +++ b/app/src/main/java/com/dollearn/student/ui/welfare/GoodsDetailActivity.kt @@ -90,7 +90,7 @@ bannerAdapter.notifyDataSetChanged() banner.currentItem = 1 tv_price.text = good.integral.toString() - tv_value.text = "¥%.2f".format(good.price) + tv_value.text = if (good.price!=null&&good.price!=0.0) "¥%.2f".format(good.price) else "" tv_value.paintFlags = tv_value.paintFlags or Paint.STRIKE_THRU_TEXT_FLAG tv_name.text = good.name tv_category.text = goodTypes?.joinToString ("|"){ it.name } -- Gitblit v1.7.1