use of com.facebook.samples.comparison.adapters.VolleyAdapter in project fresco by facebook.
the class MainActivity method setLoaderAdapter.
private void setLoaderAdapter(int index) {
FLog.v(TAG, "onImageLoaderSelect: %d", index);
resetAdapter();
mCurrentLoaderAdapterIndex = index;
mPerfListener = new PerfListener();
switch(index) {
case FRESCO_INDEX:
case FRESCO_OKHTTP_INDEX:
mCurrentAdapter = new FrescoAdapter(this, mPerfListener, index == FRESCO_INDEX ? ImagePipelineConfigFactory.getImagePipelineConfig(this) : ImagePipelineConfigFactory.getOkHttpImagePipelineConfig(this));
break;
case GLIDE_INDEX:
mCurrentAdapter = new GlideAdapter(this, mPerfListener);
break;
case PICASSO_INDEX:
mCurrentAdapter = new PicassoAdapter(this, mPerfListener);
break;
case UIL_INDEX:
mCurrentAdapter = new UilAdapter(this, mPerfListener);
break;
case VOLLEY_INDEX:
mCurrentAdapter = new VolleyAdapter(this, mPerfListener);
break;
case AQUERY_INDEX:
mCurrentAdapter = new AQueryAdapter(this, mPerfListener);
break;
default:
mCurrentAdapter = null;
return;
}
mRecyclerView.setAdapter(mCurrentAdapter);
updateAdapter(mImageUrls);
updateStats();
}
Aggregations