Use camelCase for attributes
Summary: The android standard is `prefix_camelCase` such as `layout_marginLeft`. This changes attributes like `yg_margin_left` to `yg_marginLeft`. Reviewed By: emilsjolander Differential Revision: D4681514 fbshipit-source-id: 76a80c24f19f3ee52329a2a254fe1f5fbcb40b9c
This commit is contained in:
committed by
Facebook Github Bot
parent
09f0c2d8ce
commit
0445962bd4
@@ -18,10 +18,10 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/sample_children_background"
|
||||
yoga:yg_margin_horizontal="10dp"
|
||||
yoga:yg_margin_top="5dp"
|
||||
yoga:yg_flex_direction="row"
|
||||
yoga:yg_align_items="center"
|
||||
yoga:yg_marginHorizontal="10dp"
|
||||
yoga:yg_marginTop="5dp"
|
||||
yoga:yg_flexDirection="row"
|
||||
yoga:yg_alignItems="center"
|
||||
>
|
||||
<ImageView
|
||||
android:layout_width="50dp"
|
||||
@@ -35,17 +35,17 @@
|
||||
android:text="@string/child_1_text"
|
||||
android:textColor="@color/children_text"
|
||||
yoga:yg_flex="1"
|
||||
yoga:yg_margin_start="8dp"
|
||||
yoga:yg_marginStart="8dp"
|
||||
/>
|
||||
</YogaLayout>
|
||||
<YogaLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/sample_children_background"
|
||||
yoga:yg_margin_horizontal="10dp"
|
||||
yoga:yg_margin_top="5dp"
|
||||
yoga:yg_flex_direction="row"
|
||||
yoga:yg_align_items="center"
|
||||
yoga:yg_marginHorizontal="10dp"
|
||||
yoga:yg_marginTop="5dp"
|
||||
yoga:yg_flexDirection="row"
|
||||
yoga:yg_alignItems="center"
|
||||
>
|
||||
<ImageView
|
||||
android:layout_width="50dp"
|
||||
@@ -59,17 +59,17 @@
|
||||
android:text="@string/child_2_text"
|
||||
android:textColor="@color/children_text"
|
||||
yoga:yg_flex="1"
|
||||
yoga:yg_margin_start="8dp"
|
||||
yoga:yg_marginStart="8dp"
|
||||
/>
|
||||
</YogaLayout>
|
||||
<YogaLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/sample_children_background"
|
||||
yoga:yg_margin_horizontal="10dp"
|
||||
yoga:yg_margin_top="5dp"
|
||||
yoga:yg_flex_direction="row"
|
||||
yoga:yg_align_items="center"
|
||||
yoga:yg_marginHorizontal="10dp"
|
||||
yoga:yg_marginTop="5dp"
|
||||
yoga:yg_flexDirection="row"
|
||||
yoga:yg_alignItems="center"
|
||||
>
|
||||
<ImageView
|
||||
android:layout_width="50dp"
|
||||
@@ -83,17 +83,17 @@
|
||||
android:text="@string/child_3_text"
|
||||
android:textColor="@color/children_text"
|
||||
yoga:yg_flex="1"
|
||||
yoga:yg_margin_start="8dp"
|
||||
yoga:yg_marginStart="8dp"
|
||||
/>
|
||||
</YogaLayout>
|
||||
<YogaLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/sample_children_background"
|
||||
yoga:yg_margin_horizontal="10dp"
|
||||
yoga:yg_margin_top="5dp"
|
||||
yoga:yg_flex_direction="row"
|
||||
yoga:yg_align_items="center"
|
||||
yoga:yg_marginHorizontal="10dp"
|
||||
yoga:yg_marginTop="5dp"
|
||||
yoga:yg_flexDirection="row"
|
||||
yoga:yg_alignItems="center"
|
||||
>
|
||||
<ImageView
|
||||
android:layout_width="50dp"
|
||||
@@ -107,17 +107,17 @@
|
||||
android:text="@string/child_4_text"
|
||||
android:textColor="@color/children_text"
|
||||
yoga:yg_flex="1"
|
||||
yoga:yg_margin_start="8dp"
|
||||
yoga:yg_marginStart="8dp"
|
||||
/>
|
||||
</YogaLayout>
|
||||
<YogaLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/sample_children_background"
|
||||
yoga:yg_margin_horizontal="10dp"
|
||||
yoga:yg_margin_top="5dp"
|
||||
yoga:yg_flex_direction="row"
|
||||
yoga:yg_align_items="center"
|
||||
yoga:yg_marginHorizontal="10dp"
|
||||
yoga:yg_marginTop="5dp"
|
||||
yoga:yg_flexDirection="row"
|
||||
yoga:yg_alignItems="center"
|
||||
>
|
||||
<ImageView
|
||||
android:layout_width="50dp"
|
||||
@@ -131,7 +131,7 @@
|
||||
android:text="@string/child_5_text"
|
||||
android:textColor="@color/children_text"
|
||||
yoga:yg_flex="1"
|
||||
yoga:yg_margin_start="10dp"
|
||||
yoga:yg_marginStart="10dp"
|
||||
/>
|
||||
</YogaLayout>
|
||||
</YogaLayout>
|
||||
|
@@ -403,31 +403,31 @@ public class YogaLayout extends ViewGroup {
|
||||
final int attribute = layoutParameters.numericAttributes.keyAt(i);
|
||||
final float value = layoutParameters.numericAttributes.valueAt(i);
|
||||
|
||||
if (attribute == R.styleable.yoga_yg_align_content) {
|
||||
if (attribute == R.styleable.yoga_yg_alignContent) {
|
||||
node.setAlignContent(YogaAlign.fromInt(Math.round(value)));
|
||||
} else if (attribute == R.styleable.yoga_yg_align_items) {
|
||||
} else if (attribute == R.styleable.yoga_yg_alignItems) {
|
||||
node.setAlignItems(YogaAlign.fromInt(Math.round(value)));
|
||||
} else if (attribute == R.styleable.yoga_yg_align_self) {
|
||||
} else if (attribute == R.styleable.yoga_yg_alignSelf) {
|
||||
node.setAlignSelf(YogaAlign.fromInt(Math.round(value)));
|
||||
} else if (attribute == R.styleable.yoga_yg_aspect_ratio) {
|
||||
} else if (attribute == R.styleable.yoga_yg_aspectRatio) {
|
||||
node.setAspectRatio(value);
|
||||
} else if (attribute == R.styleable.yoga_yg_border_left) {
|
||||
} else if (attribute == R.styleable.yoga_yg_borderLeft) {
|
||||
node.setBorder(YogaEdge.LEFT, value);
|
||||
} else if (attribute == R.styleable.yoga_yg_border_top) {
|
||||
} else if (attribute == R.styleable.yoga_yg_borderTop) {
|
||||
node.setBorder(YogaEdge.TOP, value);
|
||||
} else if (attribute == R.styleable.yoga_yg_border_right) {
|
||||
} else if (attribute == R.styleable.yoga_yg_borderRight) {
|
||||
node.setBorder(YogaEdge.RIGHT, value);
|
||||
} else if (attribute == R.styleable.yoga_yg_border_bottom) {
|
||||
} else if (attribute == R.styleable.yoga_yg_borderBottom) {
|
||||
node.setBorder(YogaEdge.BOTTOM, value);
|
||||
} else if (attribute == R.styleable.yoga_yg_border_start) {
|
||||
} else if (attribute == R.styleable.yoga_yg_borderStart) {
|
||||
node.setBorder(YogaEdge.START, value);
|
||||
} else if (attribute == R.styleable.yoga_yg_border_end) {
|
||||
} else if (attribute == R.styleable.yoga_yg_borderEnd) {
|
||||
node.setBorder(YogaEdge.END, value);
|
||||
} else if (attribute == R.styleable.yoga_yg_border_horizontal) {
|
||||
} else if (attribute == R.styleable.yoga_yg_borderHorizontal) {
|
||||
node.setBorder(YogaEdge.HORIZONTAL, value);
|
||||
} else if (attribute == R.styleable.yoga_yg_border_vertical) {
|
||||
} else if (attribute == R.styleable.yoga_yg_borderVertical) {
|
||||
node.setBorder(YogaEdge.VERTICAL, value);
|
||||
} else if (attribute == R.styleable.yoga_yg_border_all) {
|
||||
} else if (attribute == R.styleable.yoga_yg_borderAll) {
|
||||
node.setBorder(YogaEdge.ALL, value);
|
||||
} else if (attribute == R.styleable.yoga_yg_direction) {
|
||||
node.setDirection(YogaDirection.fromInt(Math.round(value)));
|
||||
@@ -435,83 +435,83 @@ public class YogaLayout extends ViewGroup {
|
||||
node.setDisplay(YogaDisplay.fromInt(Math.round(value)));
|
||||
} else if (attribute == R.styleable.yoga_yg_flex) {
|
||||
node.setFlex(value);
|
||||
} else if (attribute == R.styleable.yoga_yg_flex_basis) {
|
||||
} else if (attribute == R.styleable.yoga_yg_flexBasis) {
|
||||
node.setFlexBasis(value);
|
||||
} else if (attribute == R.styleable.yoga_yg_flex_direction) {
|
||||
} else if (attribute == R.styleable.yoga_yg_flexDirection) {
|
||||
node.setFlexDirection(YogaFlexDirection.fromInt(Math.round(value)));
|
||||
} else if (attribute == R.styleable.yoga_yg_flex_grow) {
|
||||
} else if (attribute == R.styleable.yoga_yg_flexGrow) {
|
||||
node.setFlexGrow(value);
|
||||
} else if (attribute == R.styleable.yoga_yg_flex_shrink) {
|
||||
} else if (attribute == R.styleable.yoga_yg_flexShrink) {
|
||||
node.setFlexShrink(value);
|
||||
} else if (attribute == R.styleable.yoga_yg_height) {
|
||||
node.setHeight(value);
|
||||
} else if (attribute == R.styleable.yoga_yg_margin_left) {
|
||||
} else if (attribute == R.styleable.yoga_yg_marginLeft) {
|
||||
node.setMargin(YogaEdge.LEFT, value);
|
||||
} else if (attribute == R.styleable.yoga_yg_justify_content) {
|
||||
} else if (attribute == R.styleable.yoga_yg_justifyContent) {
|
||||
node.setJustifyContent(YogaJustify.fromInt(Math.round(value)));
|
||||
} else if (attribute == R.styleable.yoga_yg_margin_top) {
|
||||
} else if (attribute == R.styleable.yoga_yg_marginTop) {
|
||||
node.setMargin(YogaEdge.TOP, value);
|
||||
} else if (attribute == R.styleable.yoga_yg_margin_right) {
|
||||
} else if (attribute == R.styleable.yoga_yg_marginRight) {
|
||||
node.setMargin(YogaEdge.RIGHT, value);
|
||||
} else if (attribute == R.styleable.yoga_yg_margin_bottom) {
|
||||
} else if (attribute == R.styleable.yoga_yg_marginBottom) {
|
||||
node.setMargin(YogaEdge.BOTTOM, value);
|
||||
} else if (attribute == R.styleable.yoga_yg_margin_start) {
|
||||
} else if (attribute == R.styleable.yoga_yg_marginStart) {
|
||||
node.setMargin(YogaEdge.START, value);
|
||||
} else if (attribute == R.styleable.yoga_yg_margin_end) {
|
||||
} else if (attribute == R.styleable.yoga_yg_marginEnd) {
|
||||
node.setMargin(YogaEdge.END, value);
|
||||
} else if (attribute == R.styleable.yoga_yg_margin_horizontal) {
|
||||
} else if (attribute == R.styleable.yoga_yg_marginHorizontal) {
|
||||
node.setMargin(YogaEdge.HORIZONTAL, value);
|
||||
} else if (attribute == R.styleable.yoga_yg_margin_vertical) {
|
||||
} else if (attribute == R.styleable.yoga_yg_marginVertical) {
|
||||
node.setMargin(YogaEdge.VERTICAL, value);
|
||||
} else if (attribute == R.styleable.yoga_yg_margin_all) {
|
||||
} else if (attribute == R.styleable.yoga_yg_marginAll) {
|
||||
node.setMargin(YogaEdge.ALL, value);
|
||||
} else if (attribute == R.styleable.yoga_yg_max_height) {
|
||||
} else if (attribute == R.styleable.yoga_yg_maxHeight) {
|
||||
node.setMaxHeight(value);
|
||||
} else if (attribute == R.styleable.yoga_yg_max_width) {
|
||||
} else if (attribute == R.styleable.yoga_yg_maxWidth) {
|
||||
node.setMaxWidth(value);
|
||||
} else if (attribute == R.styleable.yoga_yg_min_height) {
|
||||
} else if (attribute == R.styleable.yoga_yg_minHeight) {
|
||||
node.setMinHeight(value);
|
||||
} else if (attribute == R.styleable.yoga_yg_min_width) {
|
||||
} else if (attribute == R.styleable.yoga_yg_minWidth) {
|
||||
node.setMinWidth(value);
|
||||
} else if (attribute == R.styleable.yoga_yg_overflow) {
|
||||
node.setOverflow(YogaOverflow.fromInt(Math.round(value)));
|
||||
} else if (attribute == R.styleable.yoga_yg_padding_left) {
|
||||
} else if (attribute == R.styleable.yoga_yg_paddingLeft) {
|
||||
node.setPadding(YogaEdge.LEFT, value);
|
||||
} else if (attribute == R.styleable.yoga_yg_padding_top) {
|
||||
} else if (attribute == R.styleable.yoga_yg_paddingTop) {
|
||||
node.setPadding(YogaEdge.TOP, value);
|
||||
} else if (attribute == R.styleable.yoga_yg_padding_right) {
|
||||
} else if (attribute == R.styleable.yoga_yg_paddingRight) {
|
||||
node.setPadding(YogaEdge.RIGHT, value);
|
||||
} else if (attribute == R.styleable.yoga_yg_padding_bottom) {
|
||||
} else if (attribute == R.styleable.yoga_yg_paddingBottom) {
|
||||
node.setPadding(YogaEdge.BOTTOM, value);
|
||||
} else if (attribute == R.styleable.yoga_yg_padding_start) {
|
||||
} else if (attribute == R.styleable.yoga_yg_paddingStart) {
|
||||
node.setPadding(YogaEdge.START, value);
|
||||
} else if (attribute == R.styleable.yoga_yg_padding_end) {
|
||||
} else if (attribute == R.styleable.yoga_yg_paddingEnd) {
|
||||
node.setPadding(YogaEdge.END, value);
|
||||
} else if (attribute == R.styleable.yoga_yg_padding_horizontal) {
|
||||
} else if (attribute == R.styleable.yoga_yg_paddingHorizontal) {
|
||||
node.setPadding(YogaEdge.HORIZONTAL, value);
|
||||
} else if (attribute == R.styleable.yoga_yg_padding_vertical) {
|
||||
} else if (attribute == R.styleable.yoga_yg_paddingVertical) {
|
||||
node.setPadding(YogaEdge.VERTICAL, value);
|
||||
} else if (attribute == R.styleable.yoga_yg_padding_all) {
|
||||
} else if (attribute == R.styleable.yoga_yg_paddingAll) {
|
||||
node.setPadding(YogaEdge.ALL, value);
|
||||
} else if (attribute == R.styleable.yoga_yg_position_left) {
|
||||
} else if (attribute == R.styleable.yoga_yg_positionLeft) {
|
||||
node.setPosition(YogaEdge.LEFT, value);
|
||||
} else if (attribute == R.styleable.yoga_yg_position_top) {
|
||||
} else if (attribute == R.styleable.yoga_yg_positionTop) {
|
||||
node.setPosition(YogaEdge.TOP, value);
|
||||
} else if (attribute == R.styleable.yoga_yg_position_right) {
|
||||
} else if (attribute == R.styleable.yoga_yg_positionRight) {
|
||||
node.setPosition(YogaEdge.RIGHT, value);
|
||||
} else if (attribute == R.styleable.yoga_yg_position_bottom) {
|
||||
} else if (attribute == R.styleable.yoga_yg_positionBottom) {
|
||||
node.setPosition(YogaEdge.BOTTOM, value);
|
||||
} else if (attribute == R.styleable.yoga_yg_position_start) {
|
||||
} else if (attribute == R.styleable.yoga_yg_positionStart) {
|
||||
node.setPosition(YogaEdge.START, value);
|
||||
} else if (attribute == R.styleable.yoga_yg_position_end) {
|
||||
} else if (attribute == R.styleable.yoga_yg_positionEnd) {
|
||||
node.setPosition(YogaEdge.END, value);
|
||||
} else if (attribute == R.styleable.yoga_yg_position_horizontal) {
|
||||
} else if (attribute == R.styleable.yoga_yg_positionHorizontal) {
|
||||
node.setPosition(YogaEdge.HORIZONTAL, value);
|
||||
} else if (attribute == R.styleable.yoga_yg_position_vertical) {
|
||||
} else if (attribute == R.styleable.yoga_yg_positionVertical) {
|
||||
node.setPosition(YogaEdge.VERTICAL, value);
|
||||
} else if (attribute == R.styleable.yoga_yg_position_all) {
|
||||
} else if (attribute == R.styleable.yoga_yg_positionAll) {
|
||||
node.setPosition(YogaEdge.ALL, value);
|
||||
} else if (attribute == R.styleable.yoga_yg_position_type) {
|
||||
} else if (attribute == R.styleable.yoga_yg_positionType) {
|
||||
node.setPositionType(YogaPositionType.fromInt(Math.round(value)));
|
||||
} else if (attribute == R.styleable.yoga_yg_width) {
|
||||
node.setWidth(value);
|
||||
@@ -525,23 +525,23 @@ public class YogaLayout extends ViewGroup {
|
||||
final String value = layoutParameters.stringAttributes.valueAt(i);
|
||||
|
||||
if (value.equals("auto")) {
|
||||
if (attribute == R.styleable.yoga_yg_margin_left) {
|
||||
if (attribute == R.styleable.yoga_yg_marginLeft) {
|
||||
node.setMarginAuto(YogaEdge.LEFT);
|
||||
} else if (attribute == R.styleable.yoga_yg_margin_top) {
|
||||
} else if (attribute == R.styleable.yoga_yg_marginTop) {
|
||||
node.setMarginAuto(YogaEdge.TOP);
|
||||
} else if (attribute == R.styleable.yoga_yg_margin_right) {
|
||||
} else if (attribute == R.styleable.yoga_yg_marginRight) {
|
||||
node.setMarginAuto(YogaEdge.RIGHT);
|
||||
} else if (attribute == R.styleable.yoga_yg_margin_bottom) {
|
||||
} else if (attribute == R.styleable.yoga_yg_marginBottom) {
|
||||
node.setMarginAuto(YogaEdge.BOTTOM);
|
||||
} else if (attribute == R.styleable.yoga_yg_margin_start) {
|
||||
} else if (attribute == R.styleable.yoga_yg_marginStart) {
|
||||
node.setMarginAuto(YogaEdge.START);
|
||||
} else if (attribute == R.styleable.yoga_yg_margin_end) {
|
||||
} else if (attribute == R.styleable.yoga_yg_marginEnd) {
|
||||
node.setMarginAuto(YogaEdge.END);
|
||||
} else if (attribute == R.styleable.yoga_yg_margin_horizontal) {
|
||||
} else if (attribute == R.styleable.yoga_yg_marginHorizontal) {
|
||||
node.setMarginAuto(YogaEdge.HORIZONTAL);
|
||||
} else if (attribute == R.styleable.yoga_yg_margin_vertical) {
|
||||
} else if (attribute == R.styleable.yoga_yg_marginVertical) {
|
||||
node.setMarginAuto(YogaEdge.VERTICAL);
|
||||
} else if (attribute == R.styleable.yoga_yg_margin_all) {
|
||||
} else if (attribute == R.styleable.yoga_yg_marginAll) {
|
||||
node.setMarginAuto(YogaEdge.ALL);
|
||||
}
|
||||
}
|
||||
@@ -549,71 +549,71 @@ public class YogaLayout extends ViewGroup {
|
||||
if (value.endsWith("%")) {
|
||||
final float numericValue = Float.parseFloat(value.substring(0, value.length()-1));
|
||||
|
||||
if (attribute == R.styleable.yoga_yg_flex_basis) {
|
||||
if (attribute == R.styleable.yoga_yg_flexBasis) {
|
||||
node.setFlexBasisPercent(numericValue);
|
||||
} else if (attribute == R.styleable.yoga_yg_height) {
|
||||
node.setHeightPercent(numericValue);
|
||||
} else if (attribute == R.styleable.yoga_yg_margin_left) {
|
||||
} else if (attribute == R.styleable.yoga_yg_marginLeft) {
|
||||
node.setMarginPercent(YogaEdge.LEFT, numericValue);
|
||||
} else if (attribute == R.styleable.yoga_yg_margin_top) {
|
||||
} else if (attribute == R.styleable.yoga_yg_marginTop) {
|
||||
node.setMarginPercent(YogaEdge.TOP, numericValue);
|
||||
} else if (attribute == R.styleable.yoga_yg_margin_right) {
|
||||
} else if (attribute == R.styleable.yoga_yg_marginRight) {
|
||||
node.setMarginPercent(YogaEdge.RIGHT, numericValue);
|
||||
} else if (attribute == R.styleable.yoga_yg_margin_bottom) {
|
||||
} else if (attribute == R.styleable.yoga_yg_marginBottom) {
|
||||
node.setMarginPercent(YogaEdge.BOTTOM, numericValue);
|
||||
} else if (attribute == R.styleable.yoga_yg_margin_start) {
|
||||
} else if (attribute == R.styleable.yoga_yg_marginStart) {
|
||||
node.setMarginPercent(YogaEdge.START, numericValue);
|
||||
} else if (attribute == R.styleable.yoga_yg_margin_end) {
|
||||
} else if (attribute == R.styleable.yoga_yg_marginEnd) {
|
||||
node.setMarginPercent(YogaEdge.END, numericValue);
|
||||
} else if (attribute == R.styleable.yoga_yg_margin_horizontal) {
|
||||
} else if (attribute == R.styleable.yoga_yg_marginHorizontal) {
|
||||
node.setMarginPercent(YogaEdge.HORIZONTAL, numericValue);
|
||||
} else if (attribute == R.styleable.yoga_yg_margin_vertical) {
|
||||
} else if (attribute == R.styleable.yoga_yg_marginVertical) {
|
||||
node.setMarginPercent(YogaEdge.VERTICAL, numericValue);
|
||||
} else if (attribute == R.styleable.yoga_yg_margin_all) {
|
||||
} else if (attribute == R.styleable.yoga_yg_marginAll) {
|
||||
node.setMarginPercent(YogaEdge.ALL, numericValue);
|
||||
} else if (attribute == R.styleable.yoga_yg_max_height) {
|
||||
} else if (attribute == R.styleable.yoga_yg_maxHeight) {
|
||||
node.setMaxHeightPercent(numericValue);
|
||||
} else if (attribute == R.styleable.yoga_yg_max_width) {
|
||||
} else if (attribute == R.styleable.yoga_yg_maxWidth) {
|
||||
node.setMaxWidthPercent(numericValue);
|
||||
} else if (attribute == R.styleable.yoga_yg_min_height) {
|
||||
} else if (attribute == R.styleable.yoga_yg_minHeight) {
|
||||
node.setMinHeightPercent(numericValue);
|
||||
} else if (attribute == R.styleable.yoga_yg_min_width) {
|
||||
} else if (attribute == R.styleable.yoga_yg_minWidth) {
|
||||
node.setMinWidthPercent(numericValue);
|
||||
} else if (attribute == R.styleable.yoga_yg_padding_left) {
|
||||
} else if (attribute == R.styleable.yoga_yg_paddingLeft) {
|
||||
node.setPaddingPercent(YogaEdge.LEFT, numericValue);
|
||||
} else if (attribute == R.styleable.yoga_yg_padding_top) {
|
||||
} else if (attribute == R.styleable.yoga_yg_paddingTop) {
|
||||
node.setPaddingPercent(YogaEdge.TOP, numericValue);
|
||||
} else if (attribute == R.styleable.yoga_yg_padding_right) {
|
||||
} else if (attribute == R.styleable.yoga_yg_paddingRight) {
|
||||
node.setPaddingPercent(YogaEdge.RIGHT, numericValue);
|
||||
} else if (attribute == R.styleable.yoga_yg_padding_bottom) {
|
||||
} else if (attribute == R.styleable.yoga_yg_paddingBottom) {
|
||||
node.setPaddingPercent(YogaEdge.BOTTOM, numericValue);
|
||||
} else if (attribute == R.styleable.yoga_yg_padding_start) {
|
||||
} else if (attribute == R.styleable.yoga_yg_paddingStart) {
|
||||
node.setPaddingPercent(YogaEdge.START, numericValue);
|
||||
} else if (attribute == R.styleable.yoga_yg_padding_end) {
|
||||
} else if (attribute == R.styleable.yoga_yg_paddingEnd) {
|
||||
node.setPaddingPercent(YogaEdge.END, numericValue);
|
||||
} else if (attribute == R.styleable.yoga_yg_padding_horizontal) {
|
||||
} else if (attribute == R.styleable.yoga_yg_paddingHorizontal) {
|
||||
node.setPaddingPercent(YogaEdge.HORIZONTAL, numericValue);
|
||||
} else if (attribute == R.styleable.yoga_yg_padding_vertical) {
|
||||
} else if (attribute == R.styleable.yoga_yg_paddingVertical) {
|
||||
node.setPaddingPercent(YogaEdge.VERTICAL, numericValue);
|
||||
} else if (attribute == R.styleable.yoga_yg_padding_all) {
|
||||
} else if (attribute == R.styleable.yoga_yg_paddingAll) {
|
||||
node.setPaddingPercent(YogaEdge.ALL, numericValue);
|
||||
} else if (attribute == R.styleable.yoga_yg_position_left) {
|
||||
} else if (attribute == R.styleable.yoga_yg_positionLeft) {
|
||||
node.setPositionPercent(YogaEdge.LEFT, numericValue);
|
||||
} else if (attribute == R.styleable.yoga_yg_position_top) {
|
||||
} else if (attribute == R.styleable.yoga_yg_positionTop) {
|
||||
node.setPositionPercent(YogaEdge.TOP, numericValue);
|
||||
} else if (attribute == R.styleable.yoga_yg_position_right) {
|
||||
} else if (attribute == R.styleable.yoga_yg_positionRight) {
|
||||
node.setPositionPercent(YogaEdge.RIGHT, numericValue);
|
||||
} else if (attribute == R.styleable.yoga_yg_position_bottom) {
|
||||
} else if (attribute == R.styleable.yoga_yg_positionBottom) {
|
||||
node.setPositionPercent(YogaEdge.BOTTOM, numericValue);
|
||||
} else if (attribute == R.styleable.yoga_yg_position_start) {
|
||||
} else if (attribute == R.styleable.yoga_yg_positionStart) {
|
||||
node.setPositionPercent(YogaEdge.START, numericValue);
|
||||
} else if (attribute == R.styleable.yoga_yg_position_end) {
|
||||
} else if (attribute == R.styleable.yoga_yg_positionEnd) {
|
||||
node.setPositionPercent(YogaEdge.END, numericValue);
|
||||
} else if (attribute == R.styleable.yoga_yg_position_horizontal) {
|
||||
} else if (attribute == R.styleable.yoga_yg_positionHorizontal) {
|
||||
node.setPositionPercent(YogaEdge.HORIZONTAL, numericValue);
|
||||
} else if (attribute == R.styleable.yoga_yg_position_vertical) {
|
||||
} else if (attribute == R.styleable.yoga_yg_positionVertical) {
|
||||
node.setPositionPercent(YogaEdge.VERTICAL, numericValue);
|
||||
} else if (attribute == R.styleable.yoga_yg_position_all) {
|
||||
} else if (attribute == R.styleable.yoga_yg_positionAll) {
|
||||
node.setPositionPercent(YogaEdge.ALL, numericValue);
|
||||
} else if (attribute == R.styleable.yoga_yg_width) {
|
||||
node.setWidthPercent(numericValue);
|
||||
|
@@ -12,7 +12,7 @@
|
||||
<resources>
|
||||
<declare-styleable name="yoga">
|
||||
|
||||
<attr name="yg_align_content" format="enum">
|
||||
<attr name="yg_alignContent" format="enum">
|
||||
<enum name="auto" value="0"/>
|
||||
<enum name="flex_start" value="1"/>
|
||||
<enum name="center" value="2"/>
|
||||
@@ -21,7 +21,7 @@
|
||||
<enum name="baseline" value="5"/>
|
||||
</attr>
|
||||
|
||||
<attr name="yg_align_items" format="enum">
|
||||
<attr name="yg_alignItems" format="enum">
|
||||
<enum name="auto" value="0"/>
|
||||
<enum name="flex_start" value="1"/>
|
||||
<enum name="center" value="2"/>
|
||||
@@ -30,7 +30,7 @@
|
||||
<enum name="baseline" value="5"/>
|
||||
</attr>
|
||||
|
||||
<attr name="yg_align_self" format="enum">
|
||||
<attr name="yg_alignSelf" format="enum">
|
||||
<enum name="auto" value="0"/>
|
||||
<enum name="flex_start" value="1"/>
|
||||
<enum name="center" value="2"/>
|
||||
@@ -39,17 +39,17 @@
|
||||
<enum name="baseline" value="5"/>
|
||||
</attr>
|
||||
|
||||
<attr name="yg_aspect_ratio" format="float"/>
|
||||
<attr name="yg_aspectRatio" format="float"/>
|
||||
|
||||
<attr name="yg_border_left" format="dimension"/>
|
||||
<attr name="yg_border_top" format="dimension"/>
|
||||
<attr name="yg_border_right" format="dimension"/>
|
||||
<attr name="yg_border_bottom" format="dimension"/>
|
||||
<attr name="yg_border_start" format="dimension"/>
|
||||
<attr name="yg_border_end" format="dimension"/>
|
||||
<attr name="yg_border_horizontal" format="dimension"/>
|
||||
<attr name="yg_border_vertical" format="dimension"/>
|
||||
<attr name="yg_border_all" format="dimension"/>
|
||||
<attr name="yg_borderLeft" format="dimension"/>
|
||||
<attr name="yg_borderTop" format="dimension"/>
|
||||
<attr name="yg_borderRight" format="dimension"/>
|
||||
<attr name="yg_borderBottom" format="dimension"/>
|
||||
<attr name="yg_borderStart" format="dimension"/>
|
||||
<attr name="yg_borderEnd" format="dimension"/>
|
||||
<attr name="yg_borderHorizontal" format="dimension"/>
|
||||
<attr name="yg_borderVertical" format="dimension"/>
|
||||
<attr name="yg_borderAll" format="dimension"/>
|
||||
|
||||
<attr name="yg_direction" format="enum">
|
||||
<enum name="inherit" value="0"/>
|
||||
@@ -64,22 +64,22 @@
|
||||
|
||||
<attr name="yg_flex" format="float"/>
|
||||
|
||||
<attr name="yg_flex_basis" format="float|string"/>
|
||||
<attr name="yg_flexBasis" format="float|string"/>
|
||||
|
||||
<attr name="yg_flex_direction" format="enum">
|
||||
<attr name="yg_flexDirection" format="enum">
|
||||
<enum name="column" value="0"/>
|
||||
<enum name="column_reverse" value="1"/>
|
||||
<enum name="row" value="2"/>
|
||||
<enum name="row_reverse" value="3"/>
|
||||
</attr>
|
||||
|
||||
<attr name="yg_flex_grow" format="float"/>
|
||||
<attr name="yg_flexGrow" format="float"/>
|
||||
|
||||
<attr name="yg_flex_shrink" format="float"/>
|
||||
<attr name="yg_flexShrink" format="float"/>
|
||||
|
||||
<attr name="yg_height" format="dimension|string"/>
|
||||
|
||||
<attr name="yg_justify_content" format="enum">
|
||||
<attr name="yg_justifyContent" format="enum">
|
||||
<enum name="flex_start" value="0"/>
|
||||
<enum name="center" value="1"/>
|
||||
<enum name="flex_end" value="2"/>
|
||||
@@ -87,23 +87,23 @@
|
||||
<enum name="space_around" value="4"/>
|
||||
</attr>
|
||||
|
||||
<attr name="yg_margin_left" format="dimension|string"/>
|
||||
<attr name="yg_margin_top" format="dimension|string"/>
|
||||
<attr name="yg_margin_right" format="dimension|string"/>
|
||||
<attr name="yg_margin_bottom" format="dimension|string"/>
|
||||
<attr name="yg_margin_start" format="dimension|string"/>
|
||||
<attr name="yg_margin_end" format="dimension|string"/>
|
||||
<attr name="yg_margin_horizontal" format="dimension|string"/>
|
||||
<attr name="yg_margin_vertical" format="dimension|string"/>
|
||||
<attr name="yg_margin_all" format="dimension|string"/>
|
||||
<attr name="yg_marginLeft" format="dimension|string"/>
|
||||
<attr name="yg_marginTop" format="dimension|string"/>
|
||||
<attr name="yg_marginRight" format="dimension|string"/>
|
||||
<attr name="yg_marginBottom" format="dimension|string"/>
|
||||
<attr name="yg_marginStart" format="dimension|string"/>
|
||||
<attr name="yg_marginEnd" format="dimension|string"/>
|
||||
<attr name="yg_marginHorizontal" format="dimension|string"/>
|
||||
<attr name="yg_marginVertical" format="dimension|string"/>
|
||||
<attr name="yg_marginAll" format="dimension|string"/>
|
||||
|
||||
<attr name="yg_max_height" format="dimension|string"/>
|
||||
<attr name="yg_maxHeight" format="dimension|string"/>
|
||||
|
||||
<attr name="yg_max_width" format="dimension|string"/>
|
||||
<attr name="yg_maxWidth" format="dimension|string"/>
|
||||
|
||||
<attr name="yg_min_height" format="dimension|string"/>
|
||||
<attr name="yg_minHeight" format="dimension|string"/>
|
||||
|
||||
<attr name="yg_min_width" format="dimension|string"/>
|
||||
<attr name="yg_minWidth" format="dimension|string"/>
|
||||
|
||||
<attr name="yg_overflow" format="enum">
|
||||
<enum name="visible" value="0"/>
|
||||
@@ -111,27 +111,27 @@
|
||||
<enum name="scroll" value="2"/>
|
||||
</attr>
|
||||
|
||||
<attr name="yg_padding_left" format="dimension|string"/>
|
||||
<attr name="yg_padding_top" format="dimension|string"/>
|
||||
<attr name="yg_padding_right" format="dimension|string"/>
|
||||
<attr name="yg_padding_bottom" format="dimension|string"/>
|
||||
<attr name="yg_padding_start" format="dimension|string"/>
|
||||
<attr name="yg_padding_end" format="dimension|string"/>
|
||||
<attr name="yg_padding_horizontal" format="dimension|string"/>
|
||||
<attr name="yg_padding_vertical" format="dimension|string"/>
|
||||
<attr name="yg_padding_all" format="dimension|string"/>
|
||||
<attr name="yg_paddingLeft" format="dimension|string"/>
|
||||
<attr name="yg_paddingTop" format="dimension|string"/>
|
||||
<attr name="yg_paddingRight" format="dimension|string"/>
|
||||
<attr name="yg_paddingBottom" format="dimension|string"/>
|
||||
<attr name="yg_paddingStart" format="dimension|string"/>
|
||||
<attr name="yg_paddingEnd" format="dimension|string"/>
|
||||
<attr name="yg_paddingHorizontal" format="dimension|string"/>
|
||||
<attr name="yg_paddingVertical" format="dimension|string"/>
|
||||
<attr name="yg_paddingAll" format="dimension|string"/>
|
||||
|
||||
<attr name="yg_position_left" format="dimension|string"/>
|
||||
<attr name="yg_position_top" format="dimension|string"/>
|
||||
<attr name="yg_position_right" format="dimension|string"/>
|
||||
<attr name="yg_position_bottom" format="dimension|string"/>
|
||||
<attr name="yg_position_start" format="dimension|string"/>
|
||||
<attr name="yg_position_end" format="dimension|string"/>
|
||||
<attr name="yg_position_horizontal" format="dimension|string"/>
|
||||
<attr name="yg_position_vertical" format="dimension|string"/>
|
||||
<attr name="yg_position_all" format="dimension|string"/>
|
||||
<attr name="yg_positionLeft" format="dimension|string"/>
|
||||
<attr name="yg_positionTop" format="dimension|string"/>
|
||||
<attr name="yg_positionRight" format="dimension|string"/>
|
||||
<attr name="yg_positionBottom" format="dimension|string"/>
|
||||
<attr name="yg_positionStart" format="dimension|string"/>
|
||||
<attr name="yg_positionEnd" format="dimension|string"/>
|
||||
<attr name="yg_positionHorizontal" format="dimension|string"/>
|
||||
<attr name="yg_positionVertical" format="dimension|string"/>
|
||||
<attr name="yg_positionAll" format="dimension|string"/>
|
||||
|
||||
<attr name="yg_position_type" format="enum">
|
||||
<attr name="yg_positionType" format="enum">
|
||||
<enum name="relative" value="0"/>
|
||||
<enum name="absolute" value="1"/>
|
||||
</attr>
|
||||
|
Reference in New Issue
Block a user