mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-01 14:25:08 +08:00
Convert modules to use @ReactModule instead of getName()
Reviewed By: astreet Differential Revision: D3334273 fbshipit-source-id: a33bf72c5c184844885ef3ef610a05d9c102c8ea
This commit is contained in:
committed by
Facebook Github Bot 2
parent
9965642ebc
commit
c64213653e
@@ -30,9 +30,11 @@ import com.facebook.react.bridge.ReactApplicationContext;
|
||||
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
||||
import com.facebook.react.bridge.ReactMethod;
|
||||
import com.facebook.react.bridge.WritableMap;
|
||||
import com.facebook.react.bridge.annotations.ReactModule;
|
||||
|
||||
public class ImageLoaderModule extends ReactContextBaseJavaModule implements
|
||||
LifecycleEventListener {
|
||||
@ReactModule(name = "ImageLoader")
|
||||
public class ImageLoaderModule extends ReactContextBaseJavaModule
|
||||
implements LifecycleEventListener {
|
||||
|
||||
private static final String ERROR_INVALID_URI = "E_INVALID_URI";
|
||||
private static final String ERROR_PREFETCH_FAILURE = "E_PREFETCH_FAILURE";
|
||||
@@ -52,11 +54,6 @@ public class ImageLoaderModule extends ReactContextBaseJavaModule implements
|
||||
mCallerContext = callerContext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "ImageLoader";
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch the width and height of the given image.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user