Browse files

Fix NPE in Android Switch during measure

Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here:

Happy contributing!


Fixes #16000

see [Issue #16000](#16000)
fix a null pointer exception while using higher version ''


[ANDROID][BUGFIX][Switch] - Fix NPE in Android Switch during measure
Closes #16064

Differential Revision: D6816122

Pulled By: hramos

fbshipit-source-id: ba9a6febad4884b8ab142d8c7142085367006904
  • Loading branch information...
4ndroidev authored and facebook-github-bot committed Jan 26, 2018
1 parent 40a8434 commit 7b1915e74daa82d0a94e90ff266e9271bc43f4d8
@@ -57,6 +57,7 @@ public long measure(
// support setting custom switch text, this is fine, as all switches will measure the same
// on a specific device/theme/locale combination.
ReactSwitch reactSwitch = new ReactSwitch(getThemedContext());
final int spec = View.MeasureSpec.makeMeasureSpec(

0 comments on commit 7b1915e

Please sign in to comment.