Files
react-native/ReactAndroid/src/main/java/com/facebook/react/modules
Janic Duplessis c76523f1ad Fix text input scroll when status bar is translucent
Summary:Changed the implementation of `setTranslucent` because the old one used the view flag SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN which has the sad side effect of making the ScrollViews not adjust properly when the keyboard is opened. Instead I use `setOnApplyWindowInsetsListener` to hook in the insets calculation process and consume the top offset so the decor view doesn't add top padding for the status bar.

I also limited the translucent prop to API 21+ because `setOnApplyWindowInsetsListener` is not available before that and anyway the translucent prop is only useful with a semi-transparent status bar color which only works on API 21+.

**Test plan**
Reproduced the bug using this code in UIExplorer.
https://gist.github.com/janicduplessis/217b9994e35f960a1793

Tapping a text field that would be hidden by the soft keyboard should scroll the view so it is not hidden.

Also tested that setting the translucent prop on and off still works as before.

Fixes #6455
Closes https://github.com/facebook/react-native/pull/6481

Differential Revision: D3067199

Pulled By: mkonicek

fb-gh-sync-id: aa115f8688ac7e461e62c18ebb8ab77350d000f8
shipit-source-id: aa115f8688ac7e461e62c18ebb8ab77350d000f8
2016-03-17 17:00:29 -07:00
..
2016-01-22 16:20:13 +00:00
2016-03-07 11:28:21 -08:00
2016-01-22 16:20:13 +00:00
2016-01-22 16:20:13 +00:00
2016-03-10 07:22:26 -08:00
2016-01-25 12:34:31 -08:00
2016-01-22 16:20:13 +00:00
2016-02-26 06:46:35 -08:00
2016-02-24 10:49:33 -08:00
2016-01-22 16:20:13 +00:00
2016-01-22 16:20:13 +00:00
2016-01-22 16:20:13 +00:00
2016-03-03 04:08:31 -08:00