Search in sources :

Example 1 with VolleyDraweeHolder

use of com.facebook.samples.comparison.holders.VolleyDraweeHolder in project fresco by facebook.

the class VolleyDraweeAdapter method onCreateViewHolder.

@Override
public VolleyDraweeHolder onCreateViewHolder(ViewGroup parent, int viewType) {
    GenericDraweeHierarchy gdh = new GenericDraweeHierarchyBuilder(getContext().getResources()).setPlaceholderImage(Drawables.sPlaceholderDrawable).setFailureImage(Drawables.sErrorDrawable).build();
    InstrumentedDraweeView view = new InstrumentedDraweeView(getContext());
    view.setHierarchy(gdh);
    return new VolleyDraweeHolder(getContext(), parent, view, getPerfListener());
}
Also used : GenericDraweeHierarchy(com.facebook.drawee.generic.GenericDraweeHierarchy) GenericDraweeHierarchyBuilder(com.facebook.drawee.generic.GenericDraweeHierarchyBuilder) VolleyDraweeHolder(com.facebook.samples.comparison.holders.VolleyDraweeHolder) InstrumentedDraweeView(com.facebook.samples.comparison.instrumentation.InstrumentedDraweeView)

Aggregations

GenericDraweeHierarchy (com.facebook.drawee.generic.GenericDraweeHierarchy)1 GenericDraweeHierarchyBuilder (com.facebook.drawee.generic.GenericDraweeHierarchyBuilder)1 VolleyDraweeHolder (com.facebook.samples.comparison.holders.VolleyDraweeHolder)1 InstrumentedDraweeView (com.facebook.samples.comparison.instrumentation.InstrumentedDraweeView)1