int colors[] = {startcolor,endcolor};
GradientDrawable bg = new GradientDrawable(GradientDrawable.Orientation.LEFT_RIGHT,colors);
String startcolor = Hot_tag.get(position).getStart_bg_color().subSequence(1,
Hot_tag.get(position).getStart_bg_color().length()).toString();
String endcolor = Hot_tag.get(position).getEnd_bg_color().subSequence(1,
Hot_tag.get(position).getStart_bg_color().length()).toString();
int i_startcolor=Integer.parseInt(startcolor);
int i_endcolor = Integer.parseInt(endcolor);
int colors[] = {i_startcolor,i_endcolor};
GradientDrawable bg = new GradientDrawable(GradientDrawable.Orientation.LEFT_RIGHT,colors);
VerticalViewHolder verticalViewHolder = (VerticalViewHolder) holder;
verticalViewHolder.tvName.setText(GoodData.get(position).getGoods_title());
verticalViewHolder.tvPrice.setText(GoodData.get(position).getSale_price() + "");
verticalViewHolder.tvSold.setText("已售" + GoodData.get(position).getTotal_sale());
verticalViewHolder.tvLogo.setText(Hot_tag.get(position).getText_content());
verticalViewHolder.tvLogo.setBackground(bg);
2:
int colors[] = {Color.parseColor(Hot_tag.get(position).getStart_bg_color()),
Color.parseColor(Hot_tag.get(position).getEnd_bg_color())};
GradientDrawable BG = new GradientDrawable(GradientDrawable.Orientation.TOP_BOTTOM,colors);
verticalViewHolder.tvLogo.setBackground(BG)
GradientDrawable bg = new GradientDrawable(GradientDrawable.Orientation.LEFT_RIGHT,colors);
String startcolor = Hot_tag.get(position).getStart_bg_color().subSequence(1,
Hot_tag.get(position).getStart_bg_color().length()).toString();
String endcolor = Hot_tag.get(position).getEnd_bg_color().subSequence(1,
Hot_tag.get(position).getStart_bg_color().length()).toString();
int i_startcolor=Integer.parseInt(startcolor);
int i_endcolor = Integer.parseInt(endcolor);
int colors[] = {i_startcolor,i_endcolor};
GradientDrawable bg = new GradientDrawable(GradientDrawable.Orientation.LEFT_RIGHT,colors);
VerticalViewHolder verticalViewHolder = (VerticalViewHolder) holder;
verticalViewHolder.tvName.setText(GoodData.get(position).getGoods_title());
verticalViewHolder.tvPrice.setText(GoodData.get(position).getSale_price() + "");
verticalViewHolder.tvSold.setText("已售" + GoodData.get(position).getTotal_sale());
verticalViewHolder.tvLogo.setText(Hot_tag.get(position).getText_content());
verticalViewHolder.tvLogo.setBackground(bg);
2:
int colors[] = {Color.parseColor(Hot_tag.get(position).getStart_bg_color()),
Color.parseColor(Hot_tag.get(position).getEnd_bg_color())};
GradientDrawable BG = new GradientDrawable(GradientDrawable.Orientation.TOP_BOTTOM,colors);
verticalViewHolder.tvLogo.setBackground(BG)