Search in sources :

Example 1 with ItemViewDelegate

use of com.zhy.adapter.recyclerview.base.ItemViewDelegate in project baseAdapter by hongyangAndroid.

the class MultiItemTypeAdapter method onCreateViewHolder.

@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
    ItemViewDelegate itemViewDelegate = mItemViewDelegateManager.getItemViewDelegate(viewType);
    int layoutId = itemViewDelegate.getItemViewLayoutId();
    ViewHolder holder = ViewHolder.createViewHolder(mContext, parent, layoutId);
    onViewHolderCreated(holder, holder.getConvertView());
    setListener(parent, holder, viewType);
    return holder;
}
Also used : ViewHolder(com.zhy.adapter.recyclerview.base.ViewHolder) ItemViewDelegate(com.zhy.adapter.recyclerview.base.ItemViewDelegate)

Aggregations

ItemViewDelegate (com.zhy.adapter.recyclerview.base.ItemViewDelegate)1 ViewHolder (com.zhy.adapter.recyclerview.base.ViewHolder)1