Provide RTL support for RCTShadowView according to new csslayout

Summary:
The make current RCTShadowView support RTL layout.
1 Change all left/right to start/end for margin, padding, boarder and position
2 Calculate position in the same way as margin, padding and boarder

Reviewed By: fkgozali

Differential Revision: D3619292

fbshipit-source-id: eaaa6faeee93c964d59bb6f498d89effc09ed567
This commit is contained in:
Mengjue Wang
2016-07-29 10:30:34 -07:00
committed by Facebook Github Bot 8
parent 654a36018c
commit 70dc98dea4
4 changed files with 58 additions and 70 deletions

View File

@@ -90,12 +90,15 @@ public class ViewProps {
public static final String BORDER_BOTTOM_LEFT_RADIUS = "borderBottomLeftRadius";
public static final String BORDER_BOTTOM_RIGHT_RADIUS = "borderBottomRightRadius";
public static final int[] BORDER_SPACING_TYPES = {
Spacing.ALL, Spacing.LEFT, Spacing.RIGHT, Spacing.TOP, Spacing.BOTTOM
Spacing.ALL, Spacing.START, Spacing.END, Spacing.TOP, Spacing.BOTTOM
};
public static final int[] PADDING_MARGIN_SPACING_TYPES = {
Spacing.ALL, Spacing.VERTICAL, Spacing.HORIZONTAL, Spacing.LEFT, Spacing.RIGHT, Spacing.TOP,
Spacing.ALL, Spacing.VERTICAL, Spacing.HORIZONTAL, Spacing.START, Spacing.END, Spacing.TOP,
Spacing.BOTTOM
};
public static final int[] POSITION_SPACING_TYPES = {
Spacing.START, Spacing.END, Spacing.TOP, Spacing.BOTTOM
};
private static final HashSet<String> LAYOUT_ONLY_PROPS = new HashSet<>(
Arrays.asList(