mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-02 14:54:58 +08:00
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:
committed by
Ahmed El-Helw
parent
76abec8894
commit
59fe71caff
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user