use of com.tmall.wireless.tangram.core.adapter.GroupBasicAdapter in project Tangram-Android by alibaba.
the class BannerView method getHeaderViewFromRecycler.
private View getHeaderViewFromRecycler(@NonNull BaseCell cell) {
GroupBasicAdapter adapter = cell.serviceManager.getService(GroupBasicAdapter.class);
RecyclerView.RecycledViewPool pool = cell.serviceManager.getService(RecyclerView.RecycledViewPool.class);
int itemViewType = adapter.getItemType(cell);
BinderViewHolder holder = (BinderViewHolder) pool.getRecycledView(itemViewType);
if (holder == null) {
holder = (BinderViewHolder) adapter.createViewHolder(this, itemViewType);
}
holder.bind(cell);
mHeaderViewHolders.add(holder);
return holder.itemView;
}
use of com.tmall.wireless.tangram.core.adapter.GroupBasicAdapter in project Tangram-Android by alibaba.
the class BannerView method getFooterViewFromRecycler.
private View getFooterViewFromRecycler(@NonNull BaseCell cell) {
GroupBasicAdapter adapter = cell.serviceManager.getService(GroupBasicAdapter.class);
RecyclerView.RecycledViewPool pool = cell.serviceManager.getService(RecyclerView.RecycledViewPool.class);
int itemViewType = adapter.getItemType(cell);
BinderViewHolder holder = (BinderViewHolder) pool.getRecycledView(itemViewType);
if (holder == null) {
holder = (BinderViewHolder) adapter.createViewHolder(this, itemViewType);
}
holder.bind(cell);
mFooterViewHolders.add(holder);
return holder.itemView;
}
Aggregations