Commit f51cbd16 authored by jyx's avatar jyx

更新会员页样式

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