-
Notifications
You must be signed in to change notification settings - Fork 24.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix StyleSheet 'textAlign' for AndroidTextInput,rename Android native props #4364
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 |