use of com.facebook.imagepipeline.listener.RequestLoggingListener in project fresco by facebook.
the class DemoApplication method onCreate.
@Override
public void onCreate() {
super.onCreate();
FLog.setMinimumLoggingLevel(FLog.VERBOSE);
Set<RequestListener> listeners = new HashSet<>();
listeners.add(new RequestLoggingListener());
ImagePipelineConfig config = ImagePipelineConfig.newBuilder(this).setRequestListeners(listeners).build();
DraweeConfig draweeConfig = DraweeConfig.newBuilder().setDrawDebugOverlay(DebugOverlayHelper.isDebugOverlayEnabled(this)).build();
Fresco.initialize(this, config, draweeConfig);
}
use of com.facebook.imagepipeline.listener.RequestLoggingListener in project fresco by facebook.
the class ZoomableApplication method onCreate.
@Override
public void onCreate() {
super.onCreate();
FLog.setMinimumLoggingLevel(FLog.VERBOSE);
Set<RequestListener> listeners = new HashSet<>();
listeners.add(new RequestLoggingListener());
ImagePipelineConfig config = ImagePipelineConfig.newBuilder(this).setRequestListeners(listeners).build();
Fresco.initialize(this, config);
}
use of com.facebook.imagepipeline.listener.RequestLoggingListener in project fresco by facebook.
the class ImageRequestTest method testCreatingRequestFromExistingRequest.
@Test
public void testCreatingRequestFromExistingRequest() {
ImageRequest original = ImageRequestBuilder.newBuilderWithSource(Uri.parse("http://frescolib.org/image.jpg")).setCacheChoice(ImageRequest.CacheChoice.SMALL).setImageDecodeOptions(new ImageDecodeOptionsBuilder().build()).setLocalThumbnailPreviewsEnabled(true).setLowestPermittedRequestLevel(ImageRequest.RequestLevel.DISK_CACHE).setMediaVariations(MediaVariations.forMediaId("A113")).setPostprocessor(new BasePostprocessor() {
@Override
public String getName() {
return super.getName();
}
}).setProgressiveRenderingEnabled(true).setRequestListener(new RequestLoggingListener()).setResizeOptions(new ResizeOptions(20, 20)).setRotationOptions(RotationOptions.forceRotation(RotationOptions.ROTATE_90)).setRequestPriority(Priority.HIGH).build();
ImageRequest copy = ImageRequestBuilder.fromRequest(original).build();
assertThat(copy).isEqualTo(original);
}
use of com.facebook.imagepipeline.listener.RequestLoggingListener in project fresco by facebook.
the class AnimationApplication method onCreate.
@Override
public void onCreate() {
super.onCreate();
FLog.setMinimumLoggingLevel(FLog.VERBOSE);
Set<RequestListener> listeners = new HashSet<>();
listeners.add(new RequestLoggingListener());
ImagePipelineConfig config = ImagePipelineConfig.newBuilder(this).setRequestListeners(listeners).build();
Fresco.initialize(this, config);
}
Aggregations