Add support for ImageLoadEvents to RCTImageView

Summary: This diff implements ImageLoadEvents (ON_LOAD, ON_LOAD_END and ON_LOAD_START) in RCTImageView. ON_ERROR and ON_PROGRESS are easy to implement, too, but these 2 are supposed to carry extra information (error message and progress) but ImageLoadEvent doesn't support a payload yet (I'll add them in a separate patch).

Reviewed By: ahmedre

Differential Revision: D2824772
This commit is contained in:
Denis Koroskin
2016-01-12 18:51:12 -08:00
committed by Ahmed El-Helw
parent 76abec8894
commit 59fe71caff
9 changed files with 115 additions and 7 deletions

View File

@@ -99,6 +99,11 @@ import com.facebook.infer.annotation.Assertions;
Assertions.assumeNotNull(mCallback).invalidate();
}
@Override
public void onImageLoadEvent(int imageLoadEvent) {
// ignore
}
@Override
public void onAttached(FlatViewGroup.InvalidateCallback callback) {
mCallback = callback;