mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-02 23:05:01 +08:00
annotate FB4A's view managers with @ReactModule
Reviewed By: achen1 Differential Revision: D4044730 fbshipit-source-id: c80c23c524b2d9366c51c52cbcdee8a2a4f26f75
This commit is contained in:
committed by
Facebook Github Bot
parent
e16251b46d
commit
ffe06d3cfa
@@ -4,15 +4,16 @@ android_library(
|
||||
name = 'scroll',
|
||||
srcs = glob(['*.java']),
|
||||
deps = [
|
||||
react_native_dep('third-party/android/support/v4:lib-support-v4'),
|
||||
react_native_dep('third-party/java/infer-annotations:infer-annotations'),
|
||||
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/common:common'),
|
||||
react_native_target('java/com/facebook/react/views/view:view'),
|
||||
react_native_target('java/com/facebook/react/module/annotations:annotations'),
|
||||
react_native_target('java/com/facebook/react/touch:touch'),
|
||||
react_native_target('java/com/facebook/react/uimanager:uimanager'),
|
||||
react_native_target('java/com/facebook/react/uimanager/annotations:annotations'),
|
||||
react_native_dep('third-party/java/infer-annotations:infer-annotations'),
|
||||
react_native_dep('third-party/java/jsr-305:jsr-305'),
|
||||
react_native_dep('third-party/android/support/v4:lib-support-v4'),
|
||||
react_native_target('java/com/facebook/react/views/view:view'),
|
||||
],
|
||||
visibility = [
|
||||
'PUBLIC',
|
||||
|
||||
@@ -14,6 +14,7 @@ import javax.annotation.Nullable;
|
||||
import android.graphics.Color;
|
||||
|
||||
import com.facebook.react.bridge.ReadableArray;
|
||||
import com.facebook.react.module.annotations.ReactModule;
|
||||
import com.facebook.react.uimanager.annotations.ReactProp;
|
||||
import com.facebook.react.uimanager.ThemedReactContext;
|
||||
import com.facebook.react.uimanager.ViewGroupManager;
|
||||
@@ -25,11 +26,13 @@ import com.facebook.react.uimanager.ReactClippingViewGroupHelper;
|
||||
* <p>Note that {@link ReactScrollView} and {@link ReactHorizontalScrollView} are exposed to JS
|
||||
* as a single ScrollView component, configured via the {@code horizontal} boolean property.
|
||||
*/
|
||||
@ReactModule(name = ReactHorizontalScrollViewManager.REACT_CLASS)
|
||||
public class ReactHorizontalScrollViewManager
|
||||
extends ViewGroupManager<ReactHorizontalScrollView>
|
||||
implements ReactScrollViewCommandHelper.ScrollCommandHandler<ReactHorizontalScrollView> {
|
||||
|
||||
private static final String REACT_CLASS = "AndroidHorizontalScrollView";
|
||||
protected static final String REACT_CLASS = "AndroidHorizontalScrollView";
|
||||
|
||||
private @Nullable FpsListener mFpsListener = null;
|
||||
|
||||
public ReactHorizontalScrollViewManager() {
|
||||
|
||||
@@ -17,6 +17,7 @@ import android.graphics.Color;
|
||||
|
||||
import com.facebook.react.bridge.ReadableArray;
|
||||
import com.facebook.react.common.MapBuilder;
|
||||
import com.facebook.react.module.annotations.ReactModule;
|
||||
import com.facebook.react.uimanager.annotations.ReactProp;
|
||||
import com.facebook.react.uimanager.ThemedReactContext;
|
||||
import com.facebook.react.uimanager.ViewGroupManager;
|
||||
@@ -28,11 +29,13 @@ import com.facebook.react.uimanager.ReactClippingViewGroupHelper;
|
||||
* <p>Note that {@link ReactScrollView} and {@link ReactHorizontalScrollView} are exposed to JS
|
||||
* as a single ScrollView component, configured via the {@code horizontal} boolean property.
|
||||
*/
|
||||
@ReactModule(name = ReactScrollViewManager.REACT_CLASS)
|
||||
public class ReactScrollViewManager
|
||||
extends ViewGroupManager<ReactScrollView>
|
||||
implements ReactScrollViewCommandHelper.ScrollCommandHandler<ReactScrollView> {
|
||||
|
||||
private static final String REACT_CLASS = "RCTScrollView";
|
||||
protected static final String REACT_CLASS = "RCTScrollView";
|
||||
|
||||
private @Nullable FpsListener mFpsListener = null;
|
||||
|
||||
public ReactScrollViewManager() {
|
||||
|
||||
Reference in New Issue
Block a user