Fix StyleSheet 'textAlign' for AndroidTextInput,rename Android native props#4364
Fix StyleSheet 'textAlign' for AndroidTextInput,rename Android native props#4364hyugit wants to merge 1 commit intofacebook:masterfrom hyugit:master
Conversation
hyugit
commented
Nov 26, 2015
- rename Android native prop 'textAlign' to 'textAlignAndroid'
- rename Android native prop 'textAlignVertical' to 'textAlignVerticalAndroid'
- add another 'setTextAlign' in ReactTextInputManager for StyleSheet prop
- add demo
…e prop - rename Android native prop 'textAlign' to 'textAlignAndroid' - rename Android native prop 'textAlignVertical' to 'textAlignVerticalAndroid' - add another 'setTextAlign' in ReactTextInputManager for StyleSheet prop - add demo
|
The reason behind renaming 'textAlign' to 'textAlignAndroid': StyleSheet is looking for a prop 'textAlign' of type 'String', while AndroidTextInput is looking for an Android native prop with the same name of type 'int' |
|
I don't understand why we need separate cc @foghina who may have more context on why the decision on not using |
|
Hi @kmagiera, thanks for your input. It seems that And with the changes in this PR, |
|
I think it's fine to use To actually have any benefits from optimizing this sort of bridge traffic it would be better to think about some more generic solution that would allow us to perform this type of String<->int conversions that would be more transparent from the code perspective, so that we can optimize all those properties automatically. |
|
BTW, is it possible to overload |
|
Yes, although need to add |
|
Thanks so much, I understand this can now be closed in favor of #4481 |