Commit f51cbd16 authored by jyx's avatar jyx

更新会员页样式

parent 003e5176
......@@ -10,8 +10,8 @@ android {
applicationId "com.duben.xixiplaylet"
minSdkVersion rootProject.ext.androidMinSdkVersion
targetSdkVersion rootProject.ext.androidTargetSdkVersion
versionCode 23
versionName "2.0.2"
versionCode 24
versionName "2.0.3"
flavorDimensions "default"
// dex突破65535的限制
......
......@@ -69,19 +69,41 @@ class VipAdapter(val vipList: MutableList<VipBean.ListBean>) :
}
try {
if(!TextUtils.isEmpty(vipBean.topTitle)){
val topArray= vipBean.topTitle.split(",")
holder.tvVipItemCurMoney.text = SpanUtils()
.append(topArray[0])
.append(topArray[1])
.setFontSize(BubbleUtils.sp2px(28))
.append(topArray[2])
.create()
holder.tvVipItemMoney.text = topArray[3]
holder.tvVipItemTitle.text = topArray[4]
}else{
// try {
// if(!TextUtils.isEmpty(vipBean.topTitle)){
//
// val topArray= vipBean.topTitle.split(",")
// holder.tvVipItemCurMoney.text = SpanUtils()
// .append(topArray[0])
// .append(topArray[1])
// .setFontSize(BubbleUtils.sp2px(28))
// .append(topArray[2])
// .create()
// holder.tvVipItemMoney.text = topArray[3]
// holder.tvVipItemTitle.text = topArray[4]
// }else{
// holder.tvVipItemTitle.text = vipBean.title
// if (vipBean.price < 1) {
// holder.tvVipItemCurMoney.text = "¥${vipBean.price}"
// } 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)}"
// }
// } else {
// holder.tvVipItemMoney.visibility = View.INVISIBLE
// }
//
// }
// }catch (e:Exception){
// e.printStackTrace()
holder.tvVipItemTitle.text = vipBean.title
if (vipBean.price < 1) {
holder.tvVipItemCurMoney.text = "¥${vipBean.price}"
......@@ -100,29 +122,7 @@ class VipAdapter(val vipList: MutableList<VipBean.ListBean>) :
} else {
holder.tvVipItemMoney.visibility = View.INVISIBLE
}
}
}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.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)}"
}
} else {
holder.tvVipItemMoney.visibility = View.INVISIBLE
}
}
// }
......
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