@ Override public View generateView ( Context ctx , ViewGroup parent ) { ViewHolder viewHolder = getViewHolder ( LayoutInflater . from ( ctx ) . inflate ( getLayoutRes ( ) , parent , false ) ) ; //as we already know the type of our ViewHolder cast it to our type bindView ( viewHolder , Collections . EMPTY_LIST ) ; //return the bound and generatedView return viewHolder . itemView ; }
generates a view by the defined LayoutRes and pass the LayoutParams from the parent