Search in sources :

Example 1 with PlacesCollectionRendererBuilder

use of com.github.pedrovgs.sample.renderer.rendererbuilder.PlacesCollectionRendererBuilder in project DraggablePanel by pedrovgs.

the class MainModule method providePlaceCollectionRendererBuilder.

/**
   * Provisioning of a RendererBuilder implementation to work with places ListView. More
   * information in this library: {@link https://github.com/pedrovgs/Renderers}
   */
@Provides
protected PlacesCollectionRendererBuilder providePlaceCollectionRendererBuilder(Context context) {
    List<Renderer<PlaceViewModel>> prototypes = new LinkedList<Renderer<PlaceViewModel>>();
    prototypes.add(new PlaceRenderer(context));
    return new PlacesCollectionRendererBuilder(prototypes);
}
Also used : PlacesCollectionRendererBuilder(com.github.pedrovgs.sample.renderer.rendererbuilder.PlacesCollectionRendererBuilder) PlaceViewModel(com.github.pedrovgs.sample.viewmodel.PlaceViewModel) PlaceRenderer(com.github.pedrovgs.sample.renderer.PlaceRenderer) PlaceRenderer(com.github.pedrovgs.sample.renderer.PlaceRenderer) Renderer(com.pedrogomez.renderers.Renderer) TvShowRenderer(com.github.pedrovgs.sample.renderer.TvShowRenderer) LinkedList(java.util.LinkedList) Provides(dagger.Provides)

Aggregations

PlaceRenderer (com.github.pedrovgs.sample.renderer.PlaceRenderer)1 TvShowRenderer (com.github.pedrovgs.sample.renderer.TvShowRenderer)1 PlacesCollectionRendererBuilder (com.github.pedrovgs.sample.renderer.rendererbuilder.PlacesCollectionRendererBuilder)1 PlaceViewModel (com.github.pedrovgs.sample.viewmodel.PlaceViewModel)1 Renderer (com.pedrogomez.renderers.Renderer)1 Provides (dagger.Provides)1 LinkedList (java.util.LinkedList)1