@ Override @ SuppressWarnings ( "unchecked" ) public RecyclerView . ViewHolder onCreateViewHolder ( ViewGroup parent , int viewType ) { if ( mVerbose ) Log . v ( TAG , "onCreateViewHolder: " + viewType ) ; final RecyclerView . ViewHolder holder = mOnCreateViewHolderListener . onPreCreateViewHolder ( this , parent , viewType ) ; //set the adapter holder . itemView . setTag ( R . id . fastadapter_item_adapter , FastAdapter . this ) ; if ( mAttachDefaultListeners ) { //handle click behavior EventHookUtil . attachToView ( fastAdapterViewClickListener , holder , holder . itemView ) ; //handle long click behavior EventHookUtil . attachToView ( fastAdapterViewLongClickListener , holder , holder . itemView ) ; //handle touch behavior EventHookUtil . attachToView ( fastAdapterViewTouchListener , holder , holder . itemView ) ; } return mOnCreateViewHolderListener . onPostCreateViewHolder ( this , holder ) ; }
Creates the ViewHolder by the viewType