Java 类com.facebook.react.uimanager.annotations.ReactPropGroup 实例源码

项目:RNLearn_Project1    文件:ReactTextInputManager.java   
@ReactPropGroup(names = {
    ViewProps.BORDER_RADIUS,
    ViewProps.BORDER_TOP_LEFT_RADIUS,
    ViewProps.BORDER_TOP_RIGHT_RADIUS,
    ViewProps.BORDER_BOTTOM_RIGHT_RADIUS,
    ViewProps.BORDER_BOTTOM_LEFT_RADIUS
}, defaultFloat = YogaConstants.UNDEFINED)
public void setBorderRadius(ReactEditText view, int index, float borderRadius) {
  if (!YogaConstants.isUndefined(borderRadius)) {
    borderRadius = PixelUtil.toPixelFromDIP(borderRadius);
  }

  if (index == 0) {
    view.setBorderRadius(borderRadius);
  } else {
    view.setBorderRadius(borderRadius, index - 1);
  }
}
项目:RNLearn_Project1    文件:ReactViewManager.java   
@ReactPropGroup(names = {
    ViewProps.BORDER_RADIUS,
    ViewProps.BORDER_TOP_LEFT_RADIUS,
    ViewProps.BORDER_TOP_RIGHT_RADIUS,
    ViewProps.BORDER_BOTTOM_RIGHT_RADIUS,
    ViewProps.BORDER_BOTTOM_LEFT_RADIUS
}, defaultFloat = YogaConstants.UNDEFINED)
public void setBorderRadius(ReactViewGroup view, int index, float borderRadius) {
  if (!YogaConstants.isUndefined(borderRadius)) {
    borderRadius = PixelUtil.toPixelFromDIP(borderRadius);
  }

  if (index == 0) {
    view.setBorderRadius(borderRadius);
  } else {
    view.setBorderRadius(borderRadius, index - 1);
  }
}
项目:RNLearn_Project1    文件:ReactTextViewManager.java   
@ReactPropGroup(names = {
        ViewProps.BORDER_RADIUS,
        ViewProps.BORDER_TOP_LEFT_RADIUS,
        ViewProps.BORDER_TOP_RIGHT_RADIUS,
        ViewProps.BORDER_BOTTOM_RIGHT_RADIUS,
        ViewProps.BORDER_BOTTOM_LEFT_RADIUS
}, defaultFloat = YogaConstants.UNDEFINED)
public void setBorderRadius(ReactTextView view, int index, float borderRadius) {
  if (!YogaConstants.isUndefined(borderRadius)) {
    borderRadius = PixelUtil.toPixelFromDIP(borderRadius);
  }

  if (index == 0) {
    view.setBorderRadius(borderRadius);
  } else {
    view.setBorderRadius(borderRadius, index - 1);
  }
}
项目:RNLearn_Project1    文件:ReactHorizontalScrollViewManager.java   
@ReactPropGroup(names = {
    ViewProps.BORDER_RADIUS,
    ViewProps.BORDER_TOP_LEFT_RADIUS,
    ViewProps.BORDER_TOP_RIGHT_RADIUS,
    ViewProps.BORDER_BOTTOM_RIGHT_RADIUS,
    ViewProps.BORDER_BOTTOM_LEFT_RADIUS
}, defaultFloat = YogaConstants.UNDEFINED)
public void setBorderRadius(ReactHorizontalScrollView view, int index, float borderRadius) {
  if (!YogaConstants.isUndefined(borderRadius)) {
    borderRadius = PixelUtil.toPixelFromDIP(borderRadius);
  }

  if (index == 0) {
    view.setBorderRadius(borderRadius);
  } else {
    view.setBorderRadius(borderRadius, index - 1);
  }
}
项目:RNLearn_Project1    文件:ReactScrollViewManager.java   
@ReactPropGroup(names = {
    ViewProps.BORDER_RADIUS,
    ViewProps.BORDER_TOP_LEFT_RADIUS,
    ViewProps.BORDER_TOP_RIGHT_RADIUS,
    ViewProps.BORDER_BOTTOM_RIGHT_RADIUS,
    ViewProps.BORDER_BOTTOM_LEFT_RADIUS
}, defaultFloat = YogaConstants.UNDEFINED)
public void setBorderRadius(ReactScrollView view, int index, float borderRadius) {
  if (!YogaConstants.isUndefined(borderRadius)) {
    borderRadius = PixelUtil.toPixelFromDIP(borderRadius);
  }

  if (index == 0) {
    view.setBorderRadius(borderRadius);
  } else {
    view.setBorderRadius(borderRadius, index - 1);
  }
}
项目:RNLearn_Project1    文件:ReactImageManager.java   
@ReactPropGroup(names = {
    ViewProps.BORDER_RADIUS,
    ViewProps.BORDER_TOP_LEFT_RADIUS,
    ViewProps.BORDER_TOP_RIGHT_RADIUS,
    ViewProps.BORDER_BOTTOM_RIGHT_RADIUS,
    ViewProps.BORDER_BOTTOM_LEFT_RADIUS
}, defaultFloat = YogaConstants.UNDEFINED)
public void setBorderRadius(ReactImageView view, int index, float borderRadius) {
  if (!YogaConstants.isUndefined(borderRadius)) {
    borderRadius = PixelUtil.toPixelFromDIP(borderRadius);
  }

  if (index == 0) {
    view.setBorderRadius(borderRadius);
  } else {
    view.setBorderRadius(borderRadius, index - 1);
  }
}
项目:RNLearn_Project1    文件:LayoutShadowNode.java   
@ReactPropGroup(names = {
    ViewProps.LEFT,
    ViewProps.RIGHT,
    ViewProps.TOP,
    ViewProps.BOTTOM,
})
public void setPositionValues(int index, Dynamic position) {
  if (isVirtual()) {
    return;
  }

  mTempYogaValue.setFromDynamic(position);
  switch (mTempYogaValue.unit) {
    case POINT:
    case UNDEFINED:
      setPosition(ViewProps.POSITION_SPACING_TYPES[index], mTempYogaValue.value);
      break;
    case PERCENT:
      setPositionPercent(ViewProps.POSITION_SPACING_TYPES[index], mTempYogaValue.value);
      break;
  }

  position.recycle();
}
项目:RNLearn_Project1    文件:ReactTextInputManager.java   
@ReactPropGroup(names = {
    ViewProps.BORDER_RADIUS,
    ViewProps.BORDER_TOP_LEFT_RADIUS,
    ViewProps.BORDER_TOP_RIGHT_RADIUS,
    ViewProps.BORDER_BOTTOM_RIGHT_RADIUS,
    ViewProps.BORDER_BOTTOM_LEFT_RADIUS
}, defaultFloat = YogaConstants.UNDEFINED)
public void setBorderRadius(ReactEditText view, int index, float borderRadius) {
  if (!YogaConstants.isUndefined(borderRadius)) {
    borderRadius = PixelUtil.toPixelFromDIP(borderRadius);
  }

  if (index == 0) {
    view.setBorderRadius(borderRadius);
  } else {
    view.setBorderRadius(borderRadius, index - 1);
  }
}
项目:RNLearn_Project1    文件:ReactViewManager.java   
@ReactPropGroup(names = {
    ViewProps.BORDER_RADIUS,
    ViewProps.BORDER_TOP_LEFT_RADIUS,
    ViewProps.BORDER_TOP_RIGHT_RADIUS,
    ViewProps.BORDER_BOTTOM_RIGHT_RADIUS,
    ViewProps.BORDER_BOTTOM_LEFT_RADIUS
}, defaultFloat = YogaConstants.UNDEFINED)
public void setBorderRadius(ReactViewGroup view, int index, float borderRadius) {
  if (!YogaConstants.isUndefined(borderRadius)) {
    borderRadius = PixelUtil.toPixelFromDIP(borderRadius);
  }

  if (index == 0) {
    view.setBorderRadius(borderRadius);
  } else {
    view.setBorderRadius(borderRadius, index - 1);
  }
}
项目:RNLearn_Project1    文件:ReactTextViewManager.java   
@ReactPropGroup(names = {
        ViewProps.BORDER_RADIUS,
        ViewProps.BORDER_TOP_LEFT_RADIUS,
        ViewProps.BORDER_TOP_RIGHT_RADIUS,
        ViewProps.BORDER_BOTTOM_RIGHT_RADIUS,
        ViewProps.BORDER_BOTTOM_LEFT_RADIUS
}, defaultFloat = YogaConstants.UNDEFINED)
public void setBorderRadius(ReactTextView view, int index, float borderRadius) {
  if (!YogaConstants.isUndefined(borderRadius)) {
    borderRadius = PixelUtil.toPixelFromDIP(borderRadius);
  }

  if (index == 0) {
    view.setBorderRadius(borderRadius);
  } else {
    view.setBorderRadius(borderRadius, index - 1);
  }
}
项目:RNLearn_Project1    文件:ReactHorizontalScrollViewManager.java   
@ReactPropGroup(names = {
    ViewProps.BORDER_RADIUS,
    ViewProps.BORDER_TOP_LEFT_RADIUS,
    ViewProps.BORDER_TOP_RIGHT_RADIUS,
    ViewProps.BORDER_BOTTOM_RIGHT_RADIUS,
    ViewProps.BORDER_BOTTOM_LEFT_RADIUS
}, defaultFloat = YogaConstants.UNDEFINED)
public void setBorderRadius(ReactHorizontalScrollView view, int index, float borderRadius) {
  if (!YogaConstants.isUndefined(borderRadius)) {
    borderRadius = PixelUtil.toPixelFromDIP(borderRadius);
  }

  if (index == 0) {
    view.setBorderRadius(borderRadius);
  } else {
    view.setBorderRadius(borderRadius, index - 1);
  }
}
项目:RNLearn_Project1    文件:ReactScrollViewManager.java   
@ReactPropGroup(names = {
    ViewProps.BORDER_RADIUS,
    ViewProps.BORDER_TOP_LEFT_RADIUS,
    ViewProps.BORDER_TOP_RIGHT_RADIUS,
    ViewProps.BORDER_BOTTOM_RIGHT_RADIUS,
    ViewProps.BORDER_BOTTOM_LEFT_RADIUS
}, defaultFloat = YogaConstants.UNDEFINED)
public void setBorderRadius(ReactScrollView view, int index, float borderRadius) {
  if (!YogaConstants.isUndefined(borderRadius)) {
    borderRadius = PixelUtil.toPixelFromDIP(borderRadius);
  }

  if (index == 0) {
    view.setBorderRadius(borderRadius);
  } else {
    view.setBorderRadius(borderRadius, index - 1);
  }
}
项目:RNLearn_Project1    文件:ReactImageManager.java   
@ReactPropGroup(names = {
    ViewProps.BORDER_RADIUS,
    ViewProps.BORDER_TOP_LEFT_RADIUS,
    ViewProps.BORDER_TOP_RIGHT_RADIUS,
    ViewProps.BORDER_BOTTOM_RIGHT_RADIUS,
    ViewProps.BORDER_BOTTOM_LEFT_RADIUS
}, defaultFloat = YogaConstants.UNDEFINED)
public void setBorderRadius(ReactImageView view, int index, float borderRadius) {
  if (!YogaConstants.isUndefined(borderRadius)) {
    borderRadius = PixelUtil.toPixelFromDIP(borderRadius);
  }

  if (index == 0) {
    view.setBorderRadius(borderRadius);
  } else {
    view.setBorderRadius(borderRadius, index - 1);
  }
}
项目:RNLearn_Project1    文件:LayoutShadowNode.java   
@ReactPropGroup(names = {
    ViewProps.LEFT,
    ViewProps.RIGHT,
    ViewProps.TOP,
    ViewProps.BOTTOM,
})
public void setPositionValues(int index, Dynamic position) {
  if (isVirtual()) {
    return;
  }

  mTempYogaValue.setFromDynamic(position);
  switch (mTempYogaValue.unit) {
    case POINT:
    case UNDEFINED:
      setPosition(ViewProps.POSITION_SPACING_TYPES[index], mTempYogaValue.value);
      break;
    case PERCENT:
      setPositionPercent(ViewProps.POSITION_SPACING_TYPES[index], mTempYogaValue.value);
      break;
  }

  position.recycle();
}
项目:Ironman    文件:ReactTextInputManager.java   
@ReactPropGroup(names = {
    ViewProps.BORDER_RADIUS,
    ViewProps.BORDER_TOP_LEFT_RADIUS,
    ViewProps.BORDER_TOP_RIGHT_RADIUS,
    ViewProps.BORDER_BOTTOM_RIGHT_RADIUS,
    ViewProps.BORDER_BOTTOM_LEFT_RADIUS
}, defaultFloat = CSSConstants.UNDEFINED)
public void setBorderRadius(ReactEditText view, int index, float borderRadius) {
  if (!CSSConstants.isUndefined(borderRadius)) {
    borderRadius = PixelUtil.toPixelFromDIP(borderRadius);
  }

  if (index == 0) {
    view.setBorderRadius(borderRadius);
  } else {
    view.setBorderRadius(borderRadius, index - 1);
  }
}
项目:react-native-web-image    文件:WebImageViewManager.java   
@ReactPropGroup(names = {
        "borderColor",
        "borderLeftColor",
        "borderTopColor",
        "borderRightColor",
        "borderBottomColor"
}, customType = "Color")
public void setBorderColor(WebImageView view, int index, @Nullable Integer color) {
    if (color == null) {
        color = Color.TRANSPARENT;
    }
    if (index == 0) {
        view.setBorderColor(color);
    } else {
        view.setBorderColor(color, index - 1);
    }
}
项目:react-native-web-image    文件:WebImageViewManager.java   
@ReactPropGroup(names = {
        ViewProps.BORDER_RADIUS,
        ViewProps.BORDER_TOP_LEFT_RADIUS,
        ViewProps.BORDER_TOP_RIGHT_RADIUS,
        ViewProps.BORDER_BOTTOM_RIGHT_RADIUS,
        ViewProps.BORDER_BOTTOM_LEFT_RADIUS
}, defaultFloat = YogaConstants.UNDEFINED)
public void setBorderRadius(WebImageView view, int index, float borderRadius) {
    if (!YogaConstants.isUndefined(borderRadius)) {
        borderRadius = PixelUtil.toPixelFromDIP(borderRadius);
    }

    if (index == 0) {
        view.setBorderRadius(borderRadius);
    } else {
        view.setBorderRadius(borderRadius, index - 1);
    }
}
项目:react-native-ibeacon-android    文件:ReactViewManager.java   
@ReactPropGroup(names = {
    ViewProps.BORDER_RADIUS,
    ViewProps.BORDER_TOP_LEFT_RADIUS,
    ViewProps.BORDER_TOP_RIGHT_RADIUS,
    ViewProps.BORDER_BOTTOM_RIGHT_RADIUS,
    ViewProps.BORDER_BOTTOM_LEFT_RADIUS
}, defaultFloat = CSSConstants.UNDEFINED)
public void setBorderRadius(ReactViewGroup view, int index, float borderRadius) {
  if (!CSSConstants.isUndefined(borderRadius)) {
    borderRadius = PixelUtil.toPixelFromDIP(borderRadius);
  }

  if (index == 0) {
    view.setBorderRadius(borderRadius);
  } else {
    view.setBorderRadius(borderRadius, index - 1);
  }
}
项目:react-native-box-loaders    文件:ReactViewManager.java   
@ReactPropGroup(names = {
    ViewProps.BORDER_RADIUS,
    ViewProps.BORDER_TOP_LEFT_RADIUS,
    ViewProps.BORDER_TOP_RIGHT_RADIUS,
    ViewProps.BORDER_BOTTOM_RIGHT_RADIUS,
    ViewProps.BORDER_BOTTOM_LEFT_RADIUS
}, defaultFloat = CSSConstants.UNDEFINED)
public void setBorderRadius(ReactViewGroup view, int index, float borderRadius) {
  if (!CSSConstants.isUndefined(borderRadius)) {
    borderRadius = PixelUtil.toPixelFromDIP(borderRadius);
  }

  if (index == 0) {
    view.setBorderRadius(borderRadius);
  } else {
    view.setBorderRadius(borderRadius, index - 1);
  }
}
项目:Ironman    文件:ReactImageManager.java   
@ReactPropGroup(names = {
    ViewProps.BORDER_RADIUS,
    ViewProps.BORDER_TOP_LEFT_RADIUS,
    ViewProps.BORDER_TOP_RIGHT_RADIUS,
    ViewProps.BORDER_BOTTOM_RIGHT_RADIUS,
    ViewProps.BORDER_BOTTOM_LEFT_RADIUS
}, defaultFloat = CSSConstants.UNDEFINED)
public void setBorderRadius(ReactImageView view, int index, float borderRadius) {
  if (!CSSConstants.isUndefined(borderRadius)) {
    borderRadius = PixelUtil.toPixelFromDIP(borderRadius);
  }

  if (index == 0) {
    view.setBorderRadius(borderRadius);
  } else {
    view.setBorderRadius(borderRadius, index - 1);
  }
}
项目:RNLearn_Project1    文件:RCTView.java   
@ReactPropGroup(names = {
    "borderColor", "borderLeftColor", "borderRightColor", "borderTopColor", "borderBottomColor"
}, customType = "Color", defaultDouble = Double.NaN)
public void setBorderColor(int index, double color) {
  int type = SPACING_TYPES[index];
  if (Double.isNaN(color)) {
    getMutableBorder().resetBorderColor(type);
  } else {
    getMutableBorder().setBorderColor(type, (int) color);
  }
}
项目:RNLearn_Project1    文件:ReactTextInputManager.java   
@ReactPropGroup(names = {
    ViewProps.BORDER_WIDTH,
    ViewProps.BORDER_LEFT_WIDTH,
    ViewProps.BORDER_RIGHT_WIDTH,
    ViewProps.BORDER_TOP_WIDTH,
    ViewProps.BORDER_BOTTOM_WIDTH,
}, defaultFloat = YogaConstants.UNDEFINED)
public void setBorderWidth(ReactEditText view, int index, float width) {
  if (!YogaConstants.isUndefined(width)) {
    width = PixelUtil.toPixelFromDIP(width);
  }
  view.setBorderWidth(SPACING_TYPES[index], width);
}
项目:RNLearn_Project1    文件:ReactTextInputManager.java   
@ReactPropGroup(names = {
    "borderColor", "borderLeftColor", "borderRightColor", "borderTopColor", "borderBottomColor"
}, customType = "Color")
public void setBorderColor(ReactEditText view, int index, Integer color) {
  float rgbComponent = color == null ? YogaConstants.UNDEFINED : (float) ((int)color & 0x00FFFFFF);
  float alphaComponent = color == null ? YogaConstants.UNDEFINED : (float) ((int)color >>> 24);
  view.setBorderColor(SPACING_TYPES[index], rgbComponent, alphaComponent);
}
项目:RNLearn_Project1    文件:ReactViewManager.java   
@ReactPropGroup(names = {
    ViewProps.BORDER_WIDTH,
    ViewProps.BORDER_LEFT_WIDTH,
    ViewProps.BORDER_RIGHT_WIDTH,
    ViewProps.BORDER_TOP_WIDTH,
    ViewProps.BORDER_BOTTOM_WIDTH,
}, defaultFloat = YogaConstants.UNDEFINED)
public void setBorderWidth(ReactViewGroup view, int index, float width) {
  if (!YogaConstants.isUndefined(width)) {
    width = PixelUtil.toPixelFromDIP(width);
  }
  view.setBorderWidth(SPACING_TYPES[index], width);
}
项目:RNLearn_Project1    文件:ReactViewManager.java   
@ReactPropGroup(names = {
    "borderColor", "borderLeftColor", "borderRightColor", "borderTopColor", "borderBottomColor"
}, customType = "Color")
public void setBorderColor(ReactViewGroup view, int index, Integer color) {
  float rgbComponent = color == null ? YogaConstants.UNDEFINED : (float) ((int)color & 0x00FFFFFF);
  float alphaComponent = color == null ? YogaConstants.UNDEFINED : (float) ((int)color >>> 24);
  view.setBorderColor(SPACING_TYPES[index], rgbComponent, alphaComponent);
}
项目:RNLearn_Project1    文件:ReactTextViewManager.java   
@ReactPropGroup(names = {
        ViewProps.BORDER_WIDTH,
        ViewProps.BORDER_LEFT_WIDTH,
        ViewProps.BORDER_RIGHT_WIDTH,
        ViewProps.BORDER_TOP_WIDTH,
        ViewProps.BORDER_BOTTOM_WIDTH,
}, defaultFloat = YogaConstants.UNDEFINED)
public void setBorderWidth(ReactTextView view, int index, float width) {
  if (!YogaConstants.isUndefined(width)) {
    width = PixelUtil.toPixelFromDIP(width);
  }
  view.setBorderWidth(SPACING_TYPES[index], width);
}
项目:RNLearn_Project1    文件:ReactTextViewManager.java   
@ReactPropGroup(names = {
        "borderColor", "borderLeftColor", "borderRightColor", "borderTopColor", "borderBottomColor"
}, customType = "Color")
public void setBorderColor(ReactTextView view, int index, Integer color) {
  float rgbComponent = color == null ? YogaConstants.UNDEFINED : (float) ((int)color & 0x00FFFFFF);
  float alphaComponent = color == null ? YogaConstants.UNDEFINED : (float) ((int)color >>> 24);
  view.setBorderColor(SPACING_TYPES[index], rgbComponent, alphaComponent);
}
项目:RNLearn_Project1    文件:ReactHorizontalScrollViewManager.java   
@ReactPropGroup(names = {
    ViewProps.BORDER_WIDTH,
    ViewProps.BORDER_LEFT_WIDTH,
    ViewProps.BORDER_RIGHT_WIDTH,
    ViewProps.BORDER_TOP_WIDTH,
    ViewProps.BORDER_BOTTOM_WIDTH,
}, defaultFloat = YogaConstants.UNDEFINED)
public void setBorderWidth(ReactHorizontalScrollView view, int index, float width) {
  if (!YogaConstants.isUndefined(width)) {
    width = PixelUtil.toPixelFromDIP(width);
  }
  view.setBorderWidth(SPACING_TYPES[index], width);
}
项目:RNLearn_Project1    文件:ReactHorizontalScrollViewManager.java   
@ReactPropGroup(names = {
    "borderColor", "borderLeftColor", "borderRightColor", "borderTopColor", "borderBottomColor"
}, customType = "Color")
public void setBorderColor(ReactHorizontalScrollView view, int index, Integer color) {
  float rgbComponent =
      color == null ? YogaConstants.UNDEFINED : (float) ((int)color & 0x00FFFFFF);
  float alphaComponent = color == null ? YogaConstants.UNDEFINED : (float) ((int)color >>> 24);
  view.setBorderColor(SPACING_TYPES[index], rgbComponent, alphaComponent);
}
项目:RNLearn_Project1    文件:ReactScrollViewManager.java   
@ReactPropGroup(names = {
    ViewProps.BORDER_WIDTH,
    ViewProps.BORDER_LEFT_WIDTH,
    ViewProps.BORDER_RIGHT_WIDTH,
    ViewProps.BORDER_TOP_WIDTH,
    ViewProps.BORDER_BOTTOM_WIDTH,
}, defaultFloat = YogaConstants.UNDEFINED)
public void setBorderWidth(ReactScrollView view, int index, float width) {
  if (!YogaConstants.isUndefined(width)) {
    width = PixelUtil.toPixelFromDIP(width);
  }
  view.setBorderWidth(SPACING_TYPES[index], width);
}
项目:RNLearn_Project1    文件:ReactScrollViewManager.java   
@ReactPropGroup(names = {
    "borderColor", "borderLeftColor", "borderRightColor", "borderTopColor", "borderBottomColor"
}, customType = "Color")
public void setBorderColor(ReactScrollView view, int index, Integer color) {
  float rgbComponent =
      color == null ? YogaConstants.UNDEFINED : (float) ((int)color & 0x00FFFFFF);
  float alphaComponent = color == null ? YogaConstants.UNDEFINED : (float) ((int)color >>> 24);
  view.setBorderColor(SPACING_TYPES[index], rgbComponent, alphaComponent);
}
项目:RNLearn_Project1    文件:LayoutShadowNode.java   
@ReactPropGroup(names = {
    ViewProps.MARGIN,
    ViewProps.MARGIN_VERTICAL,
    ViewProps.MARGIN_HORIZONTAL,
    ViewProps.MARGIN_LEFT,
    ViewProps.MARGIN_RIGHT,
    ViewProps.MARGIN_TOP,
    ViewProps.MARGIN_BOTTOM,
})
public void setMargins(int index, Dynamic margin) {
  if (isVirtual()) {
    return;
  }

  mTempYogaValue.setFromDynamic(margin);
  switch (mTempYogaValue.unit) {
    case POINT:
    case UNDEFINED:
      setMargin(ViewProps.PADDING_MARGIN_SPACING_TYPES[index], mTempYogaValue.value);
      break;
    case AUTO:
      setMarginAuto(ViewProps.PADDING_MARGIN_SPACING_TYPES[index]);
      break;
    case PERCENT:
      setMarginPercent(ViewProps.PADDING_MARGIN_SPACING_TYPES[index], mTempYogaValue.value);
      break;
  }

  margin.recycle();
}
项目:RNLearn_Project1    文件:LayoutShadowNode.java   
@ReactPropGroup(names = {
    ViewProps.PADDING,
    ViewProps.PADDING_VERTICAL,
    ViewProps.PADDING_HORIZONTAL,
    ViewProps.PADDING_LEFT,
    ViewProps.PADDING_RIGHT,
    ViewProps.PADDING_TOP,
    ViewProps.PADDING_BOTTOM,
})
public void setPaddings(int index, Dynamic padding) {
  if (isVirtual()) {
    return;
  }

  mTempYogaValue.setFromDynamic(padding);
  switch (mTempYogaValue.unit) {
    case POINT:
    case UNDEFINED:
      setPadding(ViewProps.PADDING_MARGIN_SPACING_TYPES[index], mTempYogaValue.value);
      break;
    case PERCENT:
      setPaddingPercent(ViewProps.PADDING_MARGIN_SPACING_TYPES[index], mTempYogaValue.value);
      break;
  }

  padding.recycle();
}
项目:RNLearn_Project1    文件:LayoutShadowNode.java   
@ReactPropGroup(names = {
    ViewProps.BORDER_WIDTH,
    ViewProps.BORDER_LEFT_WIDTH,
    ViewProps.BORDER_RIGHT_WIDTH,
    ViewProps.BORDER_TOP_WIDTH,
    ViewProps.BORDER_BOTTOM_WIDTH,
}, defaultFloat = YogaConstants.UNDEFINED)
public void setBorderWidths(int index, float borderWidth) {
  if (isVirtual()) {
    return;
  }
  setBorder(ViewProps.BORDER_SPACING_TYPES[index], PixelUtil.toPixelFromDIP(borderWidth));
}
项目:RNLearn_Project1    文件:ViewManagersPropertyCache.java   
private PropSetter(ReactPropGroup prop, String defaultType, Method setter, int index) {
  mPropName = prop.names()[index];
  mPropType = ReactPropGroup.USE_DEFAULT_TYPE.equals(prop.customType()) ?
      defaultType : prop.customType();
  mSetter = setter;
  mIndex = index;
}
项目:RNLearn_Project1    文件:ReactPropAnnotationSetterSpecTest.java   
@Test(expected = RuntimeException.class)
public void testGroupInvalidNumberOfParams() {
  new BaseViewManager() {
    @ReactPropGroup(names = {"prop1", "prop2"})
    public void setterWIthInvalidNumberOfParams(View v, int index, float value, float other) {
    }
  }.getNativeProps();
}
项目:RNLearn_Project1    文件:ReactPropAnnotationSetterSpecTest.java   
@Test(expected = RuntimeException.class)
public void testGroupTooFewParams() {
  new BaseViewManager() {
    @ReactPropGroup(names = {"prop1", "prop2"})
    public void setterWIthTooFewParams(View v, int index) {
    }
  }.getNativeProps();
}
项目:RNLearn_Project1    文件:ReactPropAnnotationSetterSpecTest.java   
@Test(expected = RuntimeException.class)
public void testGroupNoIndexParam() {
  new BaseViewManager() {
    @ReactPropGroup(names = {"prop1", "prop2"})
    public void setterWithoutIndexParam(View v, float value, float sth) {
    }
  }.getNativeProps();
}
项目:RNLearn_Project1    文件:ReactPropAnnotationSetterSpecTest.java   
@Test(expected = RuntimeException.class)
public void testGroupNoViewParam() {
  new BaseViewManager() {
    @ReactPropGroup(names = {"prop1", "prop2"})
    public void setterWithoutViewParam(Object v, int index, float value) {
    }
  }.getNativeProps();
}
项目:RNLearn_Project1    文件:ReactPropAnnotationSetterSpecTest.java   
@Test(expected = RuntimeException.class)
public void testGroupUnsupportedPropType() {
  new BaseViewManager() {
    @ReactPropGroup(names = {"prop1", "prop2"})
    public void setterWithUnsupportedPropType(View v, int index, long value) {
    }
  }.getNativeProps();
}