|
13 | 13 | import android.util.LayoutDirection; |
14 | 14 | import android.view.Gravity; |
15 | 15 | import androidx.annotation.Nullable; |
| 16 | +import com.facebook.common.logging.FLog; |
16 | 17 | import com.facebook.react.bridge.JSApplicationIllegalArgumentException; |
17 | 18 | import com.facebook.react.bridge.ReadableArray; |
18 | 19 | import com.facebook.react.bridge.ReadableMap; |
@@ -53,6 +54,7 @@ public class TextAttributeProps { |
53 | 54 | public static final short TA_KEY_IS_HIGHLIGHTED = 20; |
54 | 55 | public static final short TA_KEY_LAYOUT_DIRECTION = 21; |
55 | 56 | public static final short TA_KEY_ACCESSIBILITY_ROLE = 22; |
| 57 | + public static final short TA_KEY_VERTICAL_ALIGN = 23; |
56 | 58 |
|
57 | 59 | public static final int UNSET = -1; |
58 | 60 |
|
@@ -99,6 +101,7 @@ public class TextAttributeProps { |
99 | 101 | protected boolean mIsUnderlineTextDecorationSet = false; |
100 | 102 | protected boolean mIsLineThroughTextDecorationSet = false; |
101 | 103 | protected boolean mIncludeFontPadding = true; |
| 104 | + protected String mVerticalAlign; |
102 | 105 |
|
103 | 106 | protected @Nullable ReactAccessibilityDelegate.AccessibilityRole mAccessibilityRole = null; |
104 | 107 | protected boolean mIsAccessibilityRoleSet = false; |
@@ -205,6 +208,9 @@ public static TextAttributeProps fromMapBuffer(MapBuffer props) { |
205 | 208 | case TA_KEY_ACCESSIBILITY_ROLE: |
206 | 209 | result.setAccessibilityRole(entry.getStringValue()); |
207 | 210 | break; |
| 211 | + case TA_KEY_VERTICAL_ALIGN: |
| 212 | + result.setVerticalAlign(entry.getStringValue()); |
| 213 | + break; |
208 | 214 | } |
209 | 215 | } |
210 | 216 |
|
@@ -609,6 +615,13 @@ private void setAccessibilityRole(@Nullable String accessibilityRole) { |
609 | 615 | } |
610 | 616 | } |
611 | 617 |
|
| 618 | + private void setVerticalAlign(@Nullable String verticalAlign) { |
| 619 | + FLog.w("React::", "verticalAlign: " + (verticalAlign)); |
| 620 | + if (verticalAlign != null) { |
| 621 | + mVerticalAlign = verticalAlign; |
| 622 | + } |
| 623 | + } |
| 624 | + |
612 | 625 | public static int getTextBreakStrategy(@Nullable String textBreakStrategy) { |
613 | 626 | int androidTextBreakStrategy = DEFAULT_BREAK_STRATEGY; |
614 | 627 | if (textBreakStrategy != null) { |
|
0 commit comments