@ Override public View getView ( int position , View convertView , ViewGroup parent ) { T content = getItem ( position ) ; rendererBuilder . withContent ( content ) ; rendererBuilder . withConvertView ( convertView ) ; rendererBuilder . withParent ( parent ) ; rendererBuilder . withLayoutInflater ( LayoutInflater . from ( parent . getContext ( ) ) ) ; Renderer < T > renderer = rendererBuilder . build ( ) ; if ( renderer == null ) { throw new NullRendererBuiltException ( "RendererBuilder have to return a not null Renderer" ) ; } updateRendererExtraValues ( content , renderer , position ) ; renderer . render ( ) ; return renderer . getRootView ( ) ; }
Main method of RendererAdapter . This method has the responsibility of update the RendererBuilder values and create or recycle a new Renderer . Once the renderer has been obtained the RendereBuilder will call the render method in the renderer and will return the Renderer root view to the ListView .