Permalink
Browse files

Add support for image onLoad, onLoadEnd, onError events for IgReactIm…

…ageView

Summary: Create separate buck library for image events so you can depend on that without depending on all of fresco

Reviewed By: brosenfeld

Differential Revision: D3907894

fbshipit-source-id: dca7a00d38b8b8bb5bab05b6883f6933fff3fa76
  • Loading branch information...
1 parent 826d734 commit 17219720e40498c7f27314ab9126531b9cb07c37 @donyu donyu committed with Facebook Github Bot 3 Sep 23, 2016
Showing with 21 additions and 1 deletion.
  1. +21 −1 ReactAndroid/src/main/java/com/facebook/react/views/image/BUCK
@@ -1,8 +1,28 @@
include_defs('//ReactAndroid/DEFS')
+IMAGE_EVENT_FILES = [
+ 'ImageLoadEvent.java',
+]
+
+android_library(
+ name = 'imageevents',
+ srcs = IMAGE_EVENT_FILES,
+ deps = [
+ react_native_dep('third-party/android/support-annotations:android-support-annotations'),
+ react_native_dep('third-party/android/support/v4:lib-support-v4'),
+ react_native_dep('third-party/java/jsr-305:jsr-305'),
+ react_native_target('java/com/facebook/react/bridge:bridge'),
+ react_native_target('java/com/facebook/react/uimanager:uimanager'),
+ ],
+ visibility = ['PUBLIC'],
+)
+
android_library(
name = 'image',
- srcs = glob(['*.java']),
+ srcs = glob(['*.java'], excludes = IMAGE_EVENT_FILES),
+ exported_deps = [
+ ':imageevents',
+ ],
deps = [
CSSLAYOUT_TARGET,
react_native_dep('libraries/fresco/fresco-react-native:fbcore'),

0 comments on commit 1721972

Please sign in to comment.