示例#1
0
  @Override
  public View getView(int position, View convertView, ViewGroup parent) {
    if (getItemViewType(position) == 0) {
      final H helper = getAdapterHelper(position, convertView, parent);
      convert(helper, getItem(position));
      return helper.getView();
    }

    return createIndeterminateProgressView(convertView, parent);
  }
  @Override
  public View getView(int position, View convertView, ViewGroup parent) {

    if (getItemViewType(position) == 0) { // 代表不是底部进度条
      return createBottomProgressBar(convertView);
    }

    H adapterHelper = getHHLAdapterHelper(position, convertView, parent);
    T item = getItem(position);
    // 将helper和item绑定到一块
    convert(adapterHelper, item);
    return adapterHelper.getView();
  }
示例#3
0
  @Override
  public View getView(int position, View convertView, ViewGroup parent) {
    /*if (parent.getChildCount()==position) {

      		final H helper = getAdapterHelper(position, convertView, parent);
          	T item = getItem(position);
          	convert(helper, item);
          	helper.setAssociatedObject(item);
          	return helper.getView();
          }else {
    	return convertView;
    }*/
    if (getItemViewType(position) == 0) {
      final H helper = getAdapterHelper(position, convertView, parent);
      T item = getItem(position);
      convert(helper, item);
      helper.setAssociatedObject(item);
      return helper.getView();
    }
    return createIndeterminateProgressView(convertView, parent);
  }