Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Android: Make lineHeight accept decimal values
Summary: Make android-version accept a decimal number as lineHeight. Credits where due, solution was given in this issue: #10607 According to the w3 spec the property line-height should accept decimal values (and it does on iOS) but the android version has the wrong data-type for the shadowed method, resulting in a stacktrace saying: com.facebook.react.bridge.UnexpectedNativeTypeException: TypeError: expected dynamic type `int64', but had type `double' Setting it to a float makes it accept decmial values as it should. * Create an app without this commit and create the same app with this commit: In both apps: - Leave line-height undefined. Behavior is unaffected by this commit. - Set lineHeight to a integer number. Behavior is unaffected by this commit. - Set lineHeight to a decimal number. Line height is now rendered with decimals in the app with this fix. * Run android integration tests to see nothing else broke. Sign the [CLA][2], if you haven't already. Small pull requests are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it. Make sure all **tests pass** on both [Travis][3] and [Circle CI][4]. PRs that break tests are unlikely to be merged. For more info, see the ["Pull Requests"][5] section of our "Contributing" guidelines. [1]: https://medium.com/martinkonicek/what-is-a-test-plan-8bfc840ec171#.y9lcuqqi9 [2]: https://code.facebook.com/cla [3]: https://travis-ci.org/facebook/react-native [4]: http://circleci.com/gh/facebook/react-native [5]: https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md#pull-requests Closes #13843 Differential Revision: D5152982 Pulled By: shergin fbshipit-source-id: cda3b72497a6c27d6948b31ec846640a8913775a
- Loading branch information