Commit ce8d0b5e authored by jyx's avatar jyx

修改 0.01展示

parent 1e6a136d
......@@ -10,8 +10,8 @@ android {
applicationId "com.duben.dayplaylet"
minSdkVersion rootProject.ext.androidMinSdkVersion
targetSdkVersion rootProject.ext.androidTargetSdkVersion
versionCode 60
versionName "6.0.0"
versionCode 601
versionName "6.0.1"
flavorDimensions "default"
// dex突破65535的限制
......
......@@ -104,28 +104,27 @@ class VipAdapter(val vipList: MutableList<VipBean.ListBean>) :
// }
// }catch (e:Exception){
// e.printStackTrace()
holder.tvVipItemTitle.text = vipBean.title
if (vipBean.price < 1) {
holder.tvVipItemCurMoney.text = "¥${vipBean.price}"
} else {
holder.tvVipItemCurMoney.text = "¥${vipBean.price}"
holder.tvVipItemTitle.text = vipBean.title
if (vipBean.price == 0.0) {
holder.tvVipItemCurMoney.text = "¥0.01"
} else {
holder.tvVipItemCurMoney.text = "¥${vipBean.price}"
// holder.tvVipItemCurMoney.text = "¥${String.format("%.0f", vipBean.price)}"
}
if (vipBean.oldPrice > 0) {
holder.tvVipItemMoney.visibility = View.VISIBLE
holder.tvVipItemMoney.getPaint().setFlags(Paint.STRIKE_THRU_TEXT_FLAG) //中间横线(删除线)
if (vipBean.oldPrice < 1) {
holder.tvVipItemMoney.text = "原价:${vipBean.oldPrice}"
} else {
holder.tvVipItemMoney.text = "原价:${String.format("%.0f", vipBean.oldPrice)}"
}
}
if (vipBean.oldPrice > 0) {
holder.tvVipItemMoney.visibility = View.VISIBLE
holder.tvVipItemMoney.getPaint().setFlags(Paint.STRIKE_THRU_TEXT_FLAG) //中间横线(删除线)
if (vipBean.oldPrice < 1) {
holder.tvVipItemMoney.text = "原价:${vipBean.oldPrice}"
} else {
holder.tvVipItemMoney.visibility = View.INVISIBLE
holder.tvVipItemMoney.text = "原价:${String.format("%.0f", vipBean.oldPrice)}"
}
} else {
holder.tvVipItemMoney.visibility = View.INVISIBLE
}
// }
holder.rlVipItemRoot.setOnClickListener {
mOnItemClickListener.onItemClick(position)
notifyDataSetChanged()
......
......@@ -55,10 +55,10 @@ class PayYesDialog(
iv_dialog_vip_quit.setOnClickListener(listener)
tv_dialog_vip_next.setOnClickListener(listener)
if (vipBean.trial == 0) {
if (vipBean.price == 0.0) {
//0-没签约 无0.01
tv_dialog_vip_count.text = SpanUtils()
.append("" + vipBean.price)
.append("0.01")
.setFontSize(30, true)
.append(" 元")
.setFontSize(16, true)
......@@ -66,7 +66,7 @@ class PayYesDialog(
iv_dialog_vip_top.setImageResource(R.mipmap.ic_vip_pay_top2)
} else {
tv_dialog_vip_count.text = SpanUtils()
.append(""+vipBean.price)
.append("" + vipBean.price)
.setFontSize(30, true)
.append(" 元")
.setFontSize(16, true)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment