Пример #1
0
 public void setData(AdInfo info) {
   this.adInfo = info;
   imageFetcher.loadImage(
       info.getCornerMark(), panel.getMore_game_released(), R.drawable.translation);
   UIUtils.setOnline(panel.getGame_online(), info.getOnline());
   GameAdapterTypeUtil.decideAdapter(
       info.getHandleType(), panel.getHandle_icon(), panel.getControl_icon());
   imageFetcher.loadImage(info.getUrl(), panel.getMore_game_iv(), R.drawable.default_vertical);
 }
Пример #2
0
  @Override
  public ViewHolder onCreateViewHolder(ViewGroup viewGroup, int viewType) {
    LayoutInflater inflater = LayoutInflater.from(UIUtils.getContext());

    View root = null;
    ViewHolder holder = null;
    switch (viewType) {
      case Constant.VIEWHOLDER_TYPE_0:
        root = inflater.inflate(R.layout.item_recyclerview_first_holder, viewGroup, false);
        holder = new DetailItemfirstHolder(root, context, mRecyclerView, info);
        break;
      case Constant.VIEWHOLDER_TYPE_1:
        root = inflater.inflate(R.layout.item_recyclerview_second_holder, viewGroup, false);
        holder = new DetailItemSecondHolder(root, mRecyclerView, context);
        break;
      default:
        break;
    }
    return holder;
  }