Commit 3ed40a4
committed
fix(edit): keep editor toolbar below the status bar after activity recreation
EditNoteActivity registered its window insets listener on the
DecorView. A listener set there replaces DecorView#onApplyWindowInsets
during insets dispatch, so the platform's own system bar fitting
silently depends on decor-internal state: after the activity is
recreated (for example when the system switches between light and dark
theme while a note is open), the new DecorView never applies the status
bar offset and the toolbar - including the in-note search bar - is
drawn behind the status bar.
Register the listener on the activity's content view instead and apply
the insets that actually arrive there. This leaves the platform's decor
handling intact: when the platform already fits the system bars, the
arriving insets are consumed and no extra padding is added; on a truly
edge-to-edge window the content view now pads itself, including the
display cutout. The bottom padding keeps the max(IME, system bar)
logic from the fix for #2700.
Reproduced on an Android 15 emulator by toggling dark mode while a
note was open (adb shell cmd uimode night yes).
Assisted-by: Claude Code:claude-fable-5
AI-assistant: Claude Code 2.1.195 (Claude Fable 5)
Signed-off-by: MiMoHo <37556964+MiMoHo@users.noreply.github.com>1 parent 6315891 commit 3ed40a4
1 file changed
Lines changed: 10 additions & 10 deletions
Lines changed: 10 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
132 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
133 | 134 | | |
134 | | - | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
141 | | - | |
142 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
| 146 | + | |
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| |||
0 commit comments