use of com.facebook.samples.comparison.holders.FrescoHolder in project fresco by facebook.
the class FrescoAdapter method onCreateViewHolder.
@Override
public FrescoHolder onCreateViewHolder(ViewGroup parent, int viewType) {
GenericDraweeHierarchy gdh = new GenericDraweeHierarchyBuilder(getContext().getResources()).setPlaceholderImage(Drawables.sPlaceholderDrawable).setFailureImage(Drawables.sErrorDrawable).setProgressBarImage(new ProgressBarDrawable()).setActualImageScaleType(ScalingUtils.ScaleType.FIT_CENTER).build();
final InstrumentedDraweeView instrView = new InstrumentedDraweeView(getContext(), gdh);
return new FrescoHolder(getContext(), parent, instrView, getPerfListener());
}
Aggregations