-
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. Closes #2702 #4481
Conversation
change `setTextAlign` and `setTextAlignVertical` to receive argument of type `String`, so that native props and stylesheet props are calling the same @ReactMethod - add demo (may not be necessary)
@@ -59,6 +61,24 @@ | |||
private static final String KEYBOARD_TYPE_NUMERIC = "numeric"; | |||
private static final InputFilter[] EMPTY_FILTERS = new InputFilter[0]; | |||
|
|||
private static final Map<String, Map<String, Integer>> TEXT_ALIGN_CONSTANTS; | |||
static { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you don't need a static block for this, you can just continue with this assignment on the line above
Thanks for the review @kmagiera! |
remove textAlign and textAlignVertical from Android native props add textAlignVertical as Text Style Prop (Android only) add TEXT_ALIGN_VERTICAL as a view prop constant
@trave7er updated the pull request. |
@kmagiera , I updated the diff based on your comments. Some highlights of updates:
Let me know what you think. Thanks, |
This looks very good. Thanks @trave7er ! I believe this should be marked as a breaking change and someone should update callsites in Fb internal apps. What needs to be done is just to move textAlign and textVerticalAlign out of view props and to the styles object cc @mkonicek |
Adding to my TODO-list of PRs. |
was going to also update the docs, and found it's already updated. Thanks! Let me know if you need me to update anything, |
@trave7er I think |
👍 on this one. I was able to put off the "Android Version" of an app to 2016, but I'd love soon. |
@trave7er Can you resolve the merge conflicts so we can try and get this merged in? |
Added Hyper-V Android Emulator Setup Instructions. Closes #3234
change `setTextAlign` and `setTextAlignVertical` to receive argument of type `String`, so that native props and stylesheet props are calling the same @ReactMethod - add demo (may not be necessary)
remove textAlign and textAlignVertical from Android native props add textAlignVertical as Text Style Prop (Android only) add TEXT_ALIGN_VERTICAL as a view prop constant
@trave7er updated the pull request. |
@christopherdro updated |
just ran into this issue myself - hoping this gets merged today! |
@trave7er Could you also squash commits? |
Actually I think shipit squashes the commits, let's try it: @facebook-github-bot shipit |
Thanks for importing. If you are an FB employee go to https://our.intern.facebook.com/intern/opensource/github/pull_request/1662384200706003/int_phab to review. |
Yup, looks squashed, landing now :) |
Any news on this? |
I need to fix an internal failing test, will cherry-pick this to 0.19. |
Merging again now. Please don't update the PR :) |
f453e14
🚀 |
Summary: change `setTextAlign` and `setTextAlignVertical` to receive argument of type `String` (the same as in `StyleSheet`), so that native props and stylesheet props are calling the same ReactMethod - add demo (may not be necessary) Closes #4481 Reviewed By: svcscm Differential Revision: D2823456 Pulled By: mkonicek fb-gh-sync-id: 349d17549f419b5bdc001d70b583423ade06bfe8
change
setTextAlign
andsetTextAlignVertical
to receive argument of typeString
(the same as inStyleSheet
), so that native props and stylesheet props are calling the same @ReactMethod