Commit 38217e6
authored
fix: clear legacy full screen flag (#1098)
## 📜 Description
Clear `FLAG_FULLSCREEN` when edge-to-edge view gets mounted.
## 💡 Motivation and Context
As per documentation:
> A fullscreen window will ignore a value of
[SOFT_INPUT_ADJUST_RESIZE](https://developer.android.com/reference/android/view/WindowManager.LayoutParams#SOFT_INPUT_ADJUST_RESIZE)
for the window's
[softInputMode](https://developer.android.com/reference/android/view/WindowManager.LayoutParams#softInputMode)
field; the window will stay fullscreen and will not resize.
[1](https://developer.android.com/reference/android/view/WindowManager.LayoutParams#FLAG_FULLSCREEN)
So if users specified somehow `FLAG_FULLSCREEN` it will ignore
`SOFT_INPUT_ADJUST_RESIZE` and it will result in double animations.
Edge-to-edge seems to be a new `FLAG_FULLSCREEN` alternative which gives
more control over things, because you can be full screen and still show
`StatusBar`. So we have a right to clear that flag when we mount
`EdgeToEdge` view 😊
Closes
#1091
## 📢 Changelog
<!-- High level overview of important changes -->
<!-- For example: fixed status bar manipulation; added new types
declarations; -->
<!-- If your changes don't affect one of platform/language below - then
remove this platform/language -->
### Android
- clear `FLAG_FULLSCREEN` when edge-to-edge gets mounted/created.
## 🤔 How Has This Been Tested?
Tested manually on Pixel 9 Pro API 31.
## 📸 Screenshots (if appropriate):
|Before|After|
|-------|-----|
|<video
src="https://github.com/user-attachments/assets/6a7c4b9d-725f-4415-aadd-88e36c293911">|<video
src="https://github.com/user-attachments/assets/a782d868-586e-482b-9bf9-36b8cf7ecf87">|
## 📝 Checklist
- [x] CI successfully passed
- [x] I added new mocks and corresponding unit-tests if library API was
changed1 parent 6c89955 commit 38217e6
File tree
1 file changed
+3
-0
lines changed- android/src/main/java/com/reactnativekeyboardcontroller/views
1 file changed
+3
-0
lines changedLines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
153 | 154 | | |
154 | 155 | | |
155 | 156 | | |
| 157 | + | |
| 158 | + | |
156 | 159 | | |
157 | 160 | | |
158 | 161 | | |
| |||
0 commit comments