| | |
| | | import com.tejia.lijin.app.entity.goods.GoodsDetailVO; |
| | | import com.tejia.lijin.app.ui.invite.ShareBrowserActivity; |
| | | import com.tejia.lijin.app.util.GlideRoundTransform; |
| | | import com.tejia.lijin.app.util.ui.GoodsDetailUtil; |
| | | import com.wpc.library.util.common.DimenUtils; |
| | | import com.wpc.library.util.common.StringUtils; |
| | | |
| | |
| | | } |
| | | }); |
| | | |
| | | |
| | | |
| | | boolean fanli = hongBaoInfo.getType() == 4; |
| | | |
| | | //初始化View显示 |
| | |
| | | viewHolder.tv_sub_money.setText(hbMoney); |
| | | viewHolder.tv_sub_money.setCompoundDrawablePadding(DimenUtils.dip2px(mContext, 8)); |
| | | if (hongBao) { |
| | | String finalMoneyStr = null; |
| | | if (fanli) { |
| | | viewHolder.tv_actual_name.setText("到手价"); |
| | | finalMoneyStr = "到手价 " + hongBaoInfo.getFinalMoney(); |
| | | viewHolder.tv_sub_money.setCompoundDrawablesWithIntrinsicBounds(R.drawable.icon_goods_detail_hongbao_fanli, 0, 0, 0); |
| | | } else { |
| | | viewHolder.tv_actual_name.setText("立减价"); |
| | | finalMoneyStr = "立减价 " + hongBaoInfo.getFinalMoney(); |
| | | viewHolder.tv_sub_money.setCompoundDrawablesWithIntrinsicBounds(R.drawable.icon_goods_detail_hongbao_hb, 0, 0, 0); |
| | | } |
| | | viewHolder.tv_sub_money_desc.setTextSize(9); |
| | | SpannableString finalMoney = new SpannableString(hongBaoInfo.getFinalMoney()); |
| | | finalMoney.setSpan(new RelativeSizeSpan(1.77f), 1, (hongBaoInfo.getFinalMoney().indexOf(".") > -1 ? hongBaoInfo.getFinalMoney().indexOf(".") : hongBaoInfo.getFinalMoney().length()), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); |
| | | |
| | | SpannableString finalMoney = new SpannableString(finalMoneyStr); |
| | | finalMoney.setSpan(new RelativeSizeSpan(1.77f), 4 + 1, (finalMoneyStr.indexOf(".") > -1 ? finalMoneyStr.indexOf(".") : finalMoneyStr.length()), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); |
| | | viewHolder.tv_final_money.setText(finalMoney); |
| | | //设置是否自动展开详情 |
| | | if (GoodsDetailUtil.spreadHoneBaoOrFanLiDetail(mContext)) { |
| | | viewHolder.fl_more.performClick(); |
| | | } |
| | | } else { |
| | | viewHolder.tv_sub_money.setCompoundDrawablesWithIntrinsicBounds(R.drawable.icon_goods_detail_hongbao_coupon, 0, 0, 0); |
| | | viewHolder.tv_sub_money_desc.setTextSize(12); |
| | |
| | | } |
| | | } |
| | | }); |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | TextView tv_sub_money; |
| | | TextView tv_sub_money_desc; |
| | | TextView tv_final_money; |
| | | TextView tv_actual_name; |
| | | ImageView iv_more; |
| | | FrameLayout fl_more; |
| | | TextView tv_desc; |
| | |
| | | v_hongbao_cut_1 = itemView.findViewById(R.id.v_hongbao_cut_1); |
| | | v_hongbao_cut_2 = itemView.findViewById(R.id.v_hongbao_cut_2); |
| | | |
| | | tv_actual_name= itemView.findViewById(R.id.tv_actual_name); |
| | | |
| | | |
| | | tv_actual_money = itemView.findViewById(R.id.tv_actual_money); |
| | | ll_level_info = itemView.findViewById(R.id.ll_level_info); |