mirror of
https://github.com/status-im/react-native.git
synced 2025-02-22 14:18:23 +00:00
Use static constants instead of strings when referring to View Managers and Native Modules
Summary: Using strings to refer to Native Modules and View Managers in ReactPackages are prone to error. The compiler replaces the constants with the actual strings anyway, so using constants gives us better type safety Reviewed By: achen1 Differential Revision: D12843649 fbshipit-source-id: 7a7c6c854c8689193f40df92dc8426a3b37f82c8
This commit is contained in:
parent
28278e1b06
commit
803e993e6a
@ -75,7 +75,7 @@ import com.facebook.react.uimanager.UIManagerModuleListener;
|
||||
public class NativeAnimatedModule extends ReactContextBaseJavaModule implements
|
||||
LifecycleEventListener, UIManagerModuleListener {
|
||||
|
||||
protected static final String NAME = "NativeAnimatedModule";
|
||||
public static final String NAME = "NativeAnimatedModule";
|
||||
|
||||
private interface UIThreadOperation {
|
||||
void execute(NativeAnimatedNodesManager animatedNodesManager);
|
||||
|
@ -24,10 +24,12 @@ import com.facebook.react.modules.core.DeviceEventManagerModule;
|
||||
* Module that monitors and provides information about the state of Touch Exploration service
|
||||
* on the device. For API >= 19.
|
||||
*/
|
||||
@ReactModule(name = "AccessibilityInfo")
|
||||
@ReactModule(name = AccessibilityInfoModule.NAME)
|
||||
public class AccessibilityInfoModule extends ReactContextBaseJavaModule
|
||||
implements LifecycleEventListener {
|
||||
|
||||
public static final String NAME = "AccessibilityInfo";
|
||||
|
||||
@TargetApi(19)
|
||||
private class ReactTouchExplorationStateChangeListener
|
||||
implements AccessibilityManager.TouchExplorationStateChangeListener {
|
||||
|
@ -56,7 +56,7 @@ import javax.annotation.Nullable;
|
||||
@ReactModule(name = CameraRollManager.NAME)
|
||||
public class CameraRollManager extends ReactContextBaseJavaModule {
|
||||
|
||||
protected static final String NAME = "CameraRollManager";
|
||||
public static final String NAME = "CameraRollManager";
|
||||
|
||||
private static final String ERROR_UNABLE_TO_LOAD = "E_UNABLE_TO_LOAD";
|
||||
private static final String ERROR_UNABLE_TO_LOAD_PERMISSION = "E_UNABLE_TO_LOAD_PERMISSION";
|
||||
|
@ -21,16 +21,18 @@ import com.facebook.react.module.annotations.ReactModule;
|
||||
/**
|
||||
* A module that allows JS to get/set clipboard contents.
|
||||
*/
|
||||
@ReactModule(name = "Clipboard")
|
||||
@ReactModule(name = ClipboardModule.NAME)
|
||||
public class ClipboardModule extends ContextBaseJavaModule {
|
||||
|
||||
public ClipboardModule(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public static final String NAME = "Clipboard";
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "Clipboard";
|
||||
return ClipboardModule.NAME;
|
||||
}
|
||||
|
||||
private ClipboardManager getClipboardService() {
|
||||
|
@ -7,10 +7,6 @@
|
||||
|
||||
package com.facebook.react.modules.datepicker;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.DatePickerDialog.OnDateSetListener;
|
||||
import android.app.DialogFragment;
|
||||
@ -19,23 +15,17 @@ import android.content.DialogInterface;
|
||||
import android.content.DialogInterface.OnDismissListener;
|
||||
import android.os.Bundle;
|
||||
import android.widget.DatePicker;
|
||||
|
||||
import com.facebook.react.bridge.NativeModule;
|
||||
import com.facebook.react.bridge.Promise;
|
||||
import com.facebook.react.bridge.ReactApplicationContext;
|
||||
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
||||
import com.facebook.react.bridge.ReactMethod;
|
||||
import com.facebook.react.bridge.ReadableMap;
|
||||
import com.facebook.react.bridge.WritableMap;
|
||||
import com.facebook.react.bridge.WritableNativeMap;
|
||||
import com.facebook.react.bridge.*;
|
||||
import com.facebook.react.common.annotations.VisibleForTesting;
|
||||
import com.facebook.react.module.annotations.ReactModule;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/**
|
||||
* {@link NativeModule} that allows JS to show a native date picker dialog and get called back when
|
||||
* the user selects a date.
|
||||
*/
|
||||
@ReactModule(name = "DatePickerAndroid")
|
||||
@ReactModule(name = DatePickerDialogModule.FRAGMENT_TAG)
|
||||
public class DatePickerDialogModule extends ReactContextBaseJavaModule {
|
||||
|
||||
@VisibleForTesting
|
||||
@ -57,7 +47,7 @@ public class DatePickerDialogModule extends ReactContextBaseJavaModule {
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "DatePickerAndroid";
|
||||
return DatePickerDialogModule.FRAGMENT_TAG;
|
||||
}
|
||||
|
||||
private class DatePickerDialogListener implements OnDateSetListener, OnDismissListener {
|
||||
|
@ -33,7 +33,7 @@ public class DialogModule extends ReactContextBaseJavaModule implements Lifecycl
|
||||
/* package */ static final String FRAGMENT_TAG =
|
||||
"com.facebook.catalyst.react.dialog.DialogModule";
|
||||
|
||||
/* package */ static final String NAME = "DialogManagerAndroid";
|
||||
public static final String NAME = "DialogManagerAndroid";
|
||||
|
||||
/* package */ static final String ACTION_BUTTON_CLICKED = "buttonClicked";
|
||||
/* package */ static final String ACTION_DISMISSED = "dismissed";
|
||||
|
@ -37,10 +37,11 @@ import okhttp3.OkHttpClient;
|
||||
*
|
||||
* <p>Does not expose any methods to JavaScript code. For initialization and cleanup only.
|
||||
*/
|
||||
@ReactModule(name = "FrescoModule", needsEagerInit = true)
|
||||
@ReactModule(name = FrescoModule.NAME, needsEagerInit = true)
|
||||
public class FrescoModule extends ReactContextBaseJavaModule implements
|
||||
ModuleDataCleaner.Cleanable, LifecycleEventListener {
|
||||
|
||||
public static final String NAME = "FrescoModule";
|
||||
private final boolean mClearOnDestroy;
|
||||
private @Nullable ImagePipelineConfig mConfig;
|
||||
|
||||
@ -114,7 +115,7 @@ public class FrescoModule extends ReactContextBaseJavaModule implements
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "FrescoModule";
|
||||
return NAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -33,13 +33,14 @@ import com.facebook.react.bridge.ReadableArray;
|
||||
import com.facebook.react.bridge.WritableMap;
|
||||
import com.facebook.react.module.annotations.ReactModule;
|
||||
|
||||
@ReactModule(name = "ImageLoader")
|
||||
@ReactModule(name = ImageLoaderModule.NAME)
|
||||
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";
|
||||
private static final String ERROR_GET_SIZE_FAILURE = "E_GET_SIZE_FAILURE";
|
||||
public static final String NAME = "ImageLoader";
|
||||
|
||||
private final Object mCallerContext;
|
||||
private final Object mEnqueuedRequestMonitor = new Object();
|
||||
@ -57,7 +58,7 @@ public class ImageLoaderModule extends ReactContextBaseJavaModule implements
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "ImageLoader";
|
||||
return NAME;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -22,16 +22,18 @@ import com.facebook.react.module.annotations.ReactModule;
|
||||
/**
|
||||
* Intent module. Launch other activities or open URLs.
|
||||
*/
|
||||
@ReactModule(name = "IntentAndroid")
|
||||
@ReactModule(name = IntentModule.NAME)
|
||||
public class IntentModule extends ReactContextBaseJavaModule {
|
||||
|
||||
public static final String NAME = "IntentAndroid";
|
||||
|
||||
public IntentModule(ReactApplicationContext reactContext) {
|
||||
super(reactContext);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "IntentAndroid";
|
||||
return NAME;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -31,9 +31,10 @@ import javax.annotation.Nullable;
|
||||
/**
|
||||
* Native module that exposes Geolocation to JS.
|
||||
*/
|
||||
@ReactModule(name = "LocationObserver")
|
||||
@ReactModule(name = LocationModule.NAME)
|
||||
public class LocationModule extends ReactContextBaseJavaModule {
|
||||
|
||||
public static final String NAME = "LocationObserver";
|
||||
private @Nullable String mWatchedProvider;
|
||||
private static final float RCT_DEFAULT_LOCATION_ACCURACY = 100;
|
||||
|
||||
@ -66,7 +67,7 @@ public class LocationModule extends ReactContextBaseJavaModule {
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "LocationObserver";
|
||||
return NAME;
|
||||
}
|
||||
|
||||
private static class LocationOptions {
|
||||
|
@ -30,7 +30,7 @@ import static com.facebook.react.modules.core.DeviceEventManagerModule.RCTDevice
|
||||
/**
|
||||
* Module that monitors and provides information about the connectivity state of the device.
|
||||
*/
|
||||
@ReactModule(name = "NetInfo")
|
||||
@ReactModule(name = NetInfoModule.NAME)
|
||||
public class NetInfoModule extends ReactContextBaseJavaModule
|
||||
implements LifecycleEventListener {
|
||||
|
||||
@ -59,6 +59,7 @@ public class NetInfoModule extends ReactContextBaseJavaModule
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\" />";
|
||||
|
||||
private static final String ERROR_MISSING_PERMISSION = "E_MISSING_PERMISSION";
|
||||
public static final String NAME = "NetInfo";
|
||||
|
||||
private final ConnectivityManager mConnectivityManager;
|
||||
private final ConnectivityBroadcastReceiver mConnectivityBroadcastReceiver;
|
||||
@ -96,7 +97,7 @@ public class NetInfoModule extends ReactContextBaseJavaModule
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "NetInfo";
|
||||
return NAME;
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
|
@ -29,10 +29,11 @@ import java.util.ArrayList;
|
||||
/**
|
||||
* Module that exposes the Android M Permission system to JS.
|
||||
*/
|
||||
@ReactModule(name = "PermissionsAndroid")
|
||||
@ReactModule(name = PermissionsModule.NAME)
|
||||
public class PermissionsModule extends ReactContextBaseJavaModule implements PermissionListener {
|
||||
|
||||
private static final String ERROR_INVALID_ACTIVITY = "E_INVALID_ACTIVITY";
|
||||
public static final String NAME = "PermissionsAndroid";
|
||||
private final SparseArray<Callback> mCallbacks;
|
||||
private int mRequestCode = 0;
|
||||
private final String GRANTED = "granted";
|
||||
@ -46,7 +47,7 @@ public class PermissionsModule extends ReactContextBaseJavaModule implements Per
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "PermissionsAndroid";
|
||||
return NAME;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -34,10 +34,11 @@ import javax.annotation.Nullable;
|
||||
/**
|
||||
* {@link NativeModule} that allows changing the appearance of the status bar.
|
||||
*/
|
||||
@ReactModule(name = "StatusBarManager")
|
||||
@ReactModule(name = StatusBarModule.NAME)
|
||||
public class StatusBarModule extends ReactContextBaseJavaModule {
|
||||
|
||||
private static final String HEIGHT_KEY = "HEIGHT";
|
||||
public static final String NAME = "StatusBarManager";
|
||||
|
||||
public StatusBarModule(ReactApplicationContext reactContext) {
|
||||
super(reactContext);
|
||||
@ -45,7 +46,7 @@ public class StatusBarModule extends ReactContextBaseJavaModule {
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "StatusBarManager";
|
||||
return NAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -38,7 +38,7 @@ import static com.facebook.react.modules.storage.ReactDatabaseSupplier.VALUE_COL
|
||||
public final class AsyncStorageModule
|
||||
extends ReactContextBaseJavaModule implements ModuleDataCleaner.Cleanable {
|
||||
|
||||
protected static final String NAME = "AsyncSQLiteDBStorage";
|
||||
public static final String NAME = "AsyncSQLiteDBStorage";
|
||||
|
||||
// SQL variable number limit, defined by SQLITE_LIMIT_VARIABLE_NUMBER:
|
||||
// https://raw.githubusercontent.com/android/platform_external_sqlite/master/dist/sqlite3.c
|
||||
|
@ -33,7 +33,7 @@ import javax.annotation.Nullable;
|
||||
* {@link NativeModule} that allows JS to show a native time picker dialog and get called back when
|
||||
* the user selects a time.
|
||||
*/
|
||||
@ReactModule(name = "TimePickerAndroid")
|
||||
@ReactModule(name = TimePickerDialogModule.FRAGMENT_TAG)
|
||||
public class TimePickerDialogModule extends ReactContextBaseJavaModule {
|
||||
|
||||
@VisibleForTesting
|
||||
@ -54,7 +54,7 @@ public class TimePickerDialogModule extends ReactContextBaseJavaModule {
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "TimePickerAndroid";
|
||||
return FRAGMENT_TAG;
|
||||
}
|
||||
|
||||
private class TimePickerDialogListener implements OnTimeSetListener, OnDismissListener {
|
||||
|
@ -21,7 +21,7 @@ import java.util.Map;
|
||||
/**
|
||||
* {@link NativeModule} that allows JS to show an Android Toast.
|
||||
*/
|
||||
@ReactModule(name = "ToastAndroid")
|
||||
@ReactModule(name = ToastModule.NAME)
|
||||
public class ToastModule extends ReactContextBaseJavaModule {
|
||||
|
||||
private static final String DURATION_SHORT_KEY = "SHORT";
|
||||
@ -30,6 +30,7 @@ public class ToastModule extends ReactContextBaseJavaModule {
|
||||
private static final String GRAVITY_TOP_KEY = "TOP";
|
||||
private static final String GRAVITY_BOTTOM_KEY = "BOTTOM";
|
||||
private static final String GRAVITY_CENTER = "CENTER";
|
||||
public static final String NAME = "ToastAndroid";
|
||||
|
||||
public ToastModule(ReactApplicationContext reactContext) {
|
||||
super(reactContext);
|
||||
@ -37,7 +38,7 @@ public class ToastModule extends ReactContextBaseJavaModule {
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "ToastAndroid";
|
||||
return NAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -16,16 +16,18 @@ import com.facebook.react.bridge.ReactMethod;
|
||||
import com.facebook.react.bridge.ReadableArray;
|
||||
import com.facebook.react.module.annotations.ReactModule;
|
||||
|
||||
@ReactModule(name = "Vibration")
|
||||
@ReactModule(name = VibrationModule.NAME)
|
||||
public class VibrationModule extends ReactContextBaseJavaModule {
|
||||
|
||||
public static final String NAME = "Vibration";
|
||||
|
||||
public VibrationModule(ReactApplicationContext reactContext) {
|
||||
super(reactContext);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "Vibration";
|
||||
return NAME;
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
|
@ -20,9 +20,9 @@ import com.facebook.react.uimanager.ViewManager;
|
||||
*/
|
||||
public class ARTRenderableViewManager extends ViewManager<View, ReactShadowNode> {
|
||||
|
||||
/* package */ static final String CLASS_GROUP = "ARTGroup";
|
||||
/* package */ static final String CLASS_SHAPE = "ARTShape";
|
||||
/* package */ static final String CLASS_TEXT = "ARTText";
|
||||
public static final String CLASS_GROUP = "ARTGroup";
|
||||
public static final String CLASS_SHAPE = "ARTShape";
|
||||
public static final String CLASS_TEXT = "ARTText";
|
||||
|
||||
private final String mClassName;
|
||||
|
||||
|
@ -22,7 +22,7 @@ import com.facebook.react.uimanager.ThemedReactContext;
|
||||
public class ARTSurfaceViewManager extends
|
||||
BaseViewManager<ARTSurfaceView, ARTSurfaceViewShadowNode> {
|
||||
|
||||
protected static final String REACT_CLASS = "ARTSurfaceView";
|
||||
public static final String REACT_CLASS = "ARTSurfaceView";
|
||||
|
||||
private static final YogaMeasureFunction MEASURE_FUNCTION = new YogaMeasureFunction() {
|
||||
@Override
|
||||
|
@ -29,7 +29,7 @@ import javax.annotation.Nullable;
|
||||
@ReactModule(name = ReactImageManager.REACT_CLASS)
|
||||
public class ReactImageManager extends SimpleViewManager<ReactImageView> {
|
||||
|
||||
protected static final String REACT_CLASS = "RCTImageView";
|
||||
public static final String REACT_CLASS = "RCTImageView";
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
|
@ -24,7 +24,7 @@ import java.util.Map;
|
||||
@ReactModule(name = ReactModalHostManager.REACT_CLASS)
|
||||
public class ReactModalHostManager extends ViewGroupManager<ReactModalHostView> {
|
||||
|
||||
protected static final String REACT_CLASS = "RCTModalHostView";
|
||||
public static final String REACT_CLASS = "RCTModalHostView";
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
|
@ -18,7 +18,7 @@ import com.facebook.react.uimanager.ThemedReactContext;
|
||||
@ReactModule(name = ReactDialogPickerManager.REACT_CLASS)
|
||||
public class ReactDialogPickerManager extends ReactPickerManager {
|
||||
|
||||
protected static final String REACT_CLASS = "AndroidDialogPicker";
|
||||
public static final String REACT_CLASS = "AndroidDialogPicker";
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
|
@ -18,7 +18,7 @@ import com.facebook.react.uimanager.ThemedReactContext;
|
||||
@ReactModule(name = ReactDropdownPickerManager.REACT_CLASS)
|
||||
public class ReactDropdownPickerManager extends ReactPickerManager {
|
||||
|
||||
protected static final String REACT_CLASS = "AndroidDropdownPicker";
|
||||
public static final String REACT_CLASS = "AndroidDropdownPicker";
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
|
@ -29,7 +29,7 @@ import com.facebook.react.uimanager.ViewProps;
|
||||
public class ReactProgressBarViewManager extends
|
||||
BaseViewManager<ProgressBarContainerView, ProgressBarShadowNode> {
|
||||
|
||||
protected static final String REACT_CLASS = "AndroidProgressBar";
|
||||
public static final String REACT_CLASS = "AndroidProgressBar";
|
||||
|
||||
/* package */ static final String PROP_STYLE = "styleAttr";
|
||||
/* package */ static final String PROP_INDETERMINATE = "indeterminate";
|
||||
|
@ -14,7 +14,7 @@ import com.facebook.react.uimanager.ViewGroupManager;
|
||||
public class ReactHorizontalScrollContainerViewManager
|
||||
extends ViewGroupManager<ReactHorizontalScrollContainerView> {
|
||||
|
||||
protected static final String REACT_CLASS = "AndroidHorizontalScrollContentView";
|
||||
public static final String REACT_CLASS = "AndroidHorizontalScrollContentView";
|
||||
|
||||
public ReactHorizontalScrollContainerViewManager() {}
|
||||
|
||||
|
@ -39,7 +39,7 @@ public class ReactHorizontalScrollViewManager
|
||||
extends ViewGroupManager<ReactHorizontalScrollView>
|
||||
implements ReactScrollViewCommandHelper.ScrollCommandHandler<ReactHorizontalScrollView> {
|
||||
|
||||
protected static final String REACT_CLASS = "AndroidHorizontalScrollView";
|
||||
public static final String REACT_CLASS = "AndroidHorizontalScrollView";
|
||||
|
||||
private static final int[] SPACING_TYPES = {
|
||||
Spacing.ALL, Spacing.LEFT, Spacing.RIGHT, Spacing.TOP, Spacing.BOTTOM,
|
||||
|
@ -43,7 +43,7 @@ public class ReactScrollViewManager
|
||||
extends ViewGroupManager<ReactScrollView>
|
||||
implements ReactScrollViewCommandHelper.ScrollCommandHandler<ReactScrollView> {
|
||||
|
||||
protected static final String REACT_CLASS = "RCTScrollView";
|
||||
public static final String REACT_CLASS = "RCTScrollView";
|
||||
|
||||
private static final int[] SPACING_TYPES = {
|
||||
Spacing.ALL, Spacing.LEFT, Spacing.RIGHT, Spacing.TOP, Spacing.BOTTOM,
|
||||
|
@ -38,7 +38,7 @@ public class ReactSliderManager extends SimpleViewManager<ReactSlider> {
|
||||
|
||||
private static final int STYLE = android.R.attr.seekBarStyle;
|
||||
|
||||
private static final String REACT_CLASS = "RCTSlider";
|
||||
public static final String REACT_CLASS = "RCTSlider";
|
||||
|
||||
static class ReactSliderShadowNode extends LayoutShadowNode implements
|
||||
YogaMeasureFunction {
|
||||
|
@ -31,7 +31,7 @@ import javax.annotation.Nullable;
|
||||
@ReactModule(name = REACT_CLASS)
|
||||
public class SwipeRefreshLayoutManager extends ViewGroupManager<ReactSwipeRefreshLayout> {
|
||||
|
||||
protected static final String REACT_CLASS = "AndroidSwipeRefreshLayout";
|
||||
public static final String REACT_CLASS = "AndroidSwipeRefreshLayout";
|
||||
|
||||
@Override
|
||||
protected ReactSwipeRefreshLayout createViewInstance(ThemedReactContext reactContext) {
|
||||
|
@ -25,7 +25,7 @@ import com.facebook.react.uimanager.ViewManager;
|
||||
public class FrescoBasedReactTextInlineImageViewManager
|
||||
extends ViewManager<View, FrescoBasedReactTextInlineImageShadowNode> {
|
||||
|
||||
protected static final String REACT_CLASS = "RCTTextInlineImage";
|
||||
public static final String REACT_CLASS = "RCTTextInlineImage";
|
||||
|
||||
private final @Nullable AbstractDraweeControllerBuilder mDraweeControllerBuilder;
|
||||
private final @Nullable Object mCallerContext;
|
||||
|
@ -28,7 +28,7 @@ import javax.annotation.Nullable;
|
||||
@ReactModule(name = ReactViewPagerManager.REACT_CLASS)
|
||||
public class ReactViewPagerManager extends ViewGroupManager<ReactViewPager> {
|
||||
|
||||
protected static final String REACT_CLASS = "AndroidViewPager";
|
||||
public static final String REACT_CLASS = "AndroidViewPager";
|
||||
|
||||
public static final int COMMAND_SET_PAGE = 1;
|
||||
public static final int COMMAND_SET_PAGE_WITHOUT_ANIMATION = 2;
|
||||
|
@ -86,7 +86,7 @@ import org.json.JSONObject;
|
||||
@ReactModule(name = ReactWebViewManager.REACT_CLASS)
|
||||
public class ReactWebViewManager extends SimpleViewManager<WebView> {
|
||||
|
||||
protected static final String REACT_CLASS = "RCTWebView";
|
||||
public static final String REACT_CLASS = "RCTWebView";
|
||||
|
||||
protected static final String HTML_ENCODING = "UTF-8";
|
||||
protected static final String HTML_MIME_TYPE = "text/html";
|
||||
|
Loading…
x
Reference in New Issue
Block a user