Commit b4569a21 authored by jyx's avatar jyx

代码优化

parent ef320078
......@@ -56,17 +56,17 @@ class VipAdapter(val vipList: MutableList<VipBean.ListBean>) :
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
val vipBean = vipList[position]
if (vipBean.trial != 0) {
holder.tvVipItemLable.setPadding(0, 0, 0, 0)
holder.tvVipItemLable.text = "限时特惠"
holder.tvVipItemLable.gravity = Gravity.CENTER
holder.tvVipItemLable.setBackgroundResource(R.mipmap.ic_vip_lable)
} else {
// if (vipBean.trial != 0) {
// holder.tvVipItemLable.setPadding(0, 0, 0, 0)
// holder.tvVipItemLable.text = "限时特惠"
// holder.tvVipItemLable.gravity = Gravity.CENTER
// holder.tvVipItemLable.setBackgroundResource(R.mipmap.ic_vip_lable)
// } else {
holder.tvVipItemLable.setPadding(0, 0, 0, 0)
holder.tvVipItemLable.text = "热门"
holder.tvVipItemLable.gravity = Gravity.CENTER
holder.tvVipItemLable.setBackgroundResource(R.mipmap.ic_vip_lable)
}
// }
// try {
......
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