com.facebook.imagepipeline.listener.RequestLoggingListener Java Examples
The following examples show how to use
com.facebook.imagepipeline.listener.RequestLoggingListener.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: FrescoHelper.java From base-module with Apache License 2.0 | 6 votes |
public void init(Context context, ImagePipelineConfig config) { if(config == null) { ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); ImagePipelineConfig.Builder builder = ImagePipelineConfig.newBuilder(context) .setResizeAndRotateEnabledForNetwork(true) .setBitmapsConfig(Bitmap.Config.ARGB_8888) .setBitmapMemoryCacheParamsSupplier(new MyBitmapMemoryCacheParamsSupplier(activityManager)) .setDownsampleEnabled(true); if (isVLoggable || isDLoggable) { Set<RequestListener> requestListeners = new HashSet<>(); requestListeners.add(new RequestLoggingListener()); builder.setRequestListeners(requestListeners); int level = isVLoggable ? FLog.VERBOSE : FLog.DEBUG; FLog.setMinimumLoggingLevel(level); } config = builder.build(); } context.getApplicationContext().registerComponentCallbacks(this); Fresco.initialize(context, config); }
Example #2
Source File: ImageRequestTest.java From fresco with MIT License | 6 votes |
@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) .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); }
Example #3
Source File: GalleryApplication.java From CommentGallery with Apache License 2.0 | 5 votes |
@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); }
Example #4
Source File: MyApp.java From WindowImageView with MIT License | 5 votes |
@Override public void onCreate() { super.onCreate(); Set<RequestListener> requestListeners = new HashSet<>(); requestListeners.add(new RequestLoggingListener()); ImagePipelineConfig config = ImagePipelineConfig.newBuilder(this) // other setters .setRequestListeners(requestListeners) .build(); Fresco.initialize(this, config); FLog.setMinimumLoggingLevel(FLog.VERBOSE); }
Example #5
Source File: AnimationApplication.java From fresco with MIT License | 5 votes |
@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); }
Example #6
Source File: ZoomableApplication.java From fresco with MIT License | 5 votes |
@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); }
Example #7
Source File: FrescoImageLoader.java From FimiX8-RE with MIT License | 4 votes |
private static void configureLoggingListeners(Builder configBuilder) { configBuilder.setRequestListeners(Sets.newHashSet(new RequestLoggingListener())); }
Example #8
Source File: ImagePipelineConfigFactory.java From meiShi with Apache License 2.0 | 4 votes |
private static void configureLoggingListeners(ImagePipelineConfig.Builder configBuilder) { Set<RequestListener> requestListeners = new HashSet<>(); requestListeners.add(new RequestLoggingListener()); configBuilder.setRequestListeners(requestListeners); }
Example #9
Source File: ImagePipelineConfigFactory.java From fresco with MIT License | 4 votes |
private static void configureLoggingListeners(ImagePipelineConfig.Builder configBuilder) { Set<RequestListener> requestListeners = new HashSet<>(); requestListeners.add(new RequestLoggingListener()); configBuilder.setRequestListeners(requestListeners); }