| | |
| | | |
| | | class VoiceGridAdapter(list: ArrayList<CommonItemBean>):HFRecyclerAdapter<CommonItemBean>(list,R.layout.item_voice_grid) { |
| | | override fun onBind(holder: ViewHolder, position: Int, data: CommonItemBean) { |
| | | holder.bind<SimpleDraweeView>(R.id.iv_bg).setImageURI(data.backgroundUrl) |
| | | holder.bind<SimpleDraweeView>(R.id.iv_bg).setImageURI(data.coverUrl?.split(",")?.elementAtOrNull(1)) |
| | | holder.setText(R.id.tv_title,data?.meditationTitle) |
| | | holder.setText(R.id.tv_subtitle,data?.coverDescription) |
| | | holder.setText(R.id.tv_count,(data?.realLearnedNum?:0).toString()) |
| | | holder.setText(R.id.tv_count,(data.realLearnedNum+data.virtualLearnedNum).toString()) |
| | | |
| | | val iv_vip = holder.bind<View>(R.id.iv_vip) |
| | | val tv_price = holder.bind<TextView>(R.id.tv_price) |
| | |
| | | 3->{ |
| | | iv_vip.gone() |
| | | tv_price.visible() |
| | | tv_price.text = SpanBuilder("¥${"9.0"}").size(0,1,7).build() |
| | | tv_price.text = SpanBuilder("¥${data.generalPrice}").size(0,1,7).build() |
| | | }else->{ |
| | | iv_vip.gone() |
| | | tv_price.gone() |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |