Java 类com.facebook.react.touch.JSResponderHandler 实例源码

项目:RNLearn_Project1    文件:ViewManager.java   
/**
 * Creates a view and installs event emitters on it.
 */
public final T createView(
    ThemedReactContext reactContext,
    JSResponderHandler jsResponderHandler) {
  T view = createViewInstance(reactContext);
  addEventEmitters(reactContext, view);
  if (view instanceof ReactInterceptingViewGroup) {
    ((ReactInterceptingViewGroup) view).setOnInterceptTouchEventListener(jsResponderHandler);
  }
  return view;
}
项目:RNLearn_Project1    文件:SimpleViewPropertyTest.java   
@Test
public void testOpacity() {
  View view = mManager.createView(mThemedContext, new JSResponderHandler());

  mManager.updateProperties(view, buildStyles());
  assertThat(view.getAlpha()).isEqualTo(1.0f);

  mManager.updateProperties(view, buildStyles("opacity", 0.31));
  assertThat(view.getAlpha()).isEqualTo(0.31f, offset(1e-5f));

  mManager.updateProperties(view, buildStyles("opacity", null));
  assertThat(view.getAlpha()).isEqualTo(1.0f);
}
项目:RNLearn_Project1    文件:ViewManager.java   
/**
 * Creates a view and installs event emitters on it.
 */
public final T createView(
    ThemedReactContext reactContext,
    JSResponderHandler jsResponderHandler) {
  T view = createViewInstance(reactContext);
  addEventEmitters(reactContext, view);
  if (view instanceof ReactInterceptingViewGroup) {
    ((ReactInterceptingViewGroup) view).setOnInterceptTouchEventListener(jsResponderHandler);
  }
  return view;
}
项目:RNLearn_Project1    文件:SimpleViewPropertyTest.java   
@Test
public void testOpacity() {
  View view = mManager.createView(mThemedContext, new JSResponderHandler());

  mManager.updateProperties(view, buildStyles());
  assertThat(view.getAlpha()).isEqualTo(1.0f);

  mManager.updateProperties(view, buildStyles("opacity", 0.31));
  assertThat(view.getAlpha()).isEqualTo(0.31f, offset(1e-5f));

  mManager.updateProperties(view, buildStyles("opacity", null));
  assertThat(view.getAlpha()).isEqualTo(1.0f);
}
项目:ReactNativeSignatureExample    文件:ViewManager.java   
/**
 * Creates a view and installs event emitters on it.
 */
public final T createView(
    ThemedReactContext reactContext,
    JSResponderHandler jsResponderHandler) {
  T view = createViewInstance(reactContext);
  addEventEmitters(reactContext, view);
  if (view instanceof ReactInterceptingViewGroup) {
    ((ReactInterceptingViewGroup) view).setOnInterceptTouchEventListener(jsResponderHandler);
  }
  return view;
}
项目:ReactNativeSignatureExample    文件:SimpleViewPropertyTest.java   
@Test
public void testOpacity() {
  View view = mManager.createView(mThemedContext, new JSResponderHandler());

  mManager.updateProperties(view, buildStyles());
  assertThat(view.getAlpha()).isEqualTo(1.0f);

  mManager.updateProperties(view, buildStyles("opacity", 0.31));
  assertThat(view.getAlpha()).isEqualTo(0.31f, offset(1e-5f));

  mManager.updateProperties(view, buildStyles("opacity", null));
  assertThat(view.getAlpha()).isEqualTo(1.0f);
}
项目:react-native-ibeacon-android    文件:ViewManager.java   
/**
 * Creates a view and installs event emitters on it.
 */
public final T createView(
    ThemedReactContext reactContext,
    JSResponderHandler jsResponderHandler) {
  T view = createViewInstance(reactContext);
  addEventEmitters(reactContext, view);
  if (view instanceof ReactInterceptingViewGroup) {
    ((ReactInterceptingViewGroup) view).setOnInterceptTouchEventListener(jsResponderHandler);
  }
  return view;
}
项目:react-native-ibeacon-android    文件:SimpleViewPropertyTest.java   
@Test
public void testOpacity() {
  View view = mManager.createView(mThemedContext, new JSResponderHandler());

  mManager.updateProperties(view, buildStyles());
  assertThat(view.getAlpha()).isEqualTo(1.0f);

  mManager.updateProperties(view, buildStyles("opacity", 0.31));
  assertThat(view.getAlpha()).isEqualTo(0.31f, offset(1e-5f));

  mManager.updateProperties(view, buildStyles("opacity", null));
  assertThat(view.getAlpha()).isEqualTo(1.0f);
}
项目:react-native-box-loaders    文件:ViewManager.java   
/**
 * Creates a view and installs event emitters on it.
 */
public final T createView(
    ThemedReactContext reactContext,
    JSResponderHandler jsResponderHandler) {
  T view = createViewInstance(reactContext);
  addEventEmitters(reactContext, view);
  if (view instanceof ReactInterceptingViewGroup) {
    ((ReactInterceptingViewGroup) view).setOnInterceptTouchEventListener(jsResponderHandler);
  }
  return view;
}
项目:react-native-box-loaders    文件:SimpleViewPropertyTest.java   
@Test
public void testOpacity() {
  View view = mManager.createView(mThemedContext, new JSResponderHandler());

  mManager.updateProperties(view, buildStyles());
  assertThat(view.getAlpha()).isEqualTo(1.0f);

  mManager.updateProperties(view, buildStyles("opacity", 0.31));
  assertThat(view.getAlpha()).isEqualTo(0.31f, offset(1e-5f));

  mManager.updateProperties(view, buildStyles("opacity", null));
  assertThat(view.getAlpha()).isEqualTo(1.0f);
}
项目:Ironman    文件:ViewManager.java   
/**
 * Creates a view and installs event emitters on it.
 */
public final T createView(
    ThemedReactContext reactContext,
    JSResponderHandler jsResponderHandler) {
  T view = createViewInstance(reactContext);
  addEventEmitters(reactContext, view);
  if (view instanceof ReactInterceptingViewGroup) {
    ((ReactInterceptingViewGroup) view).setOnInterceptTouchEventListener(jsResponderHandler);
  }
  return view;
}
项目:Ironman    文件:SimpleViewPropertyTest.java   
@Test
public void testOpacity() {
  View view = mManager.createView(mThemedContext, new JSResponderHandler());

  mManager.updateProperties(view, buildStyles());
  assertThat(view.getAlpha()).isEqualTo(1.0f);

  mManager.updateProperties(view, buildStyles("opacity", 0.31));
  assertThat(view.getAlpha()).isEqualTo(0.31f, offset(1e-5f));

  mManager.updateProperties(view, buildStyles("opacity", null));
  assertThat(view.getAlpha()).isEqualTo(1.0f);
}