[Android] Black panel and UI flicker during keyboard hide animation with AdjustResize and SafeAreaEdges="All" after upgrading to .NET MAUI 10
- Dominant language
- C#
- Stars
- 23.3k
- Forks
- 2k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 297
Description
### Description
After upgrading from **.NET MAUI 9** to **.NET MAUI 10**, we started observing a visual glitch on **Android** when the software keyboard is dismissed. When the keyboard closes, the UI briefly flickers and a black panel becomes visible, sliding downward from the keyboard area before disappearing. During this animation, UI controls are temporarily covered by the black panel. This behavior was not present in our .NET MAUI 9 version and appeared after upgrading to .NET MAUI 10.
**Environment:**
• .NET MAUI: 10.0.80 (also reproducible with 10.0.90 and inflight versions)
• Platform: Android
• Device: Samsung Galaxy
• Android Version: Android 11
• API Level: 30
**Soft input mode:**
`Window.SetSoftInputMode(Android.Views.SoftInput.AdjustResize);
`
**Content page:**
`
`
**Expected Behavior:**
When the keyboard is dismissed, the page should smoothly resize back to its original layout without flickering or displaying any intermediate visual artifacts.
**Actual Behavior:**
When the keyboard is dismissed:
1. The keyboard starts hiding.
2. A black panel remains visible for a short time after the keyboard begins closing.
3. The panel slides downward toward the bottom of the screen.
4. During this animation, UI controls are briefly obscured.
5. The panel eventually disappears and the layout returns to normal.
The effect looks related to Android IME (keyboard) inset/animation handling.
**Additional notes:**
• The issue disappears when using Window.SetSoftInputMode(Android.Views.SoftInput.AdjustPan). However, AdjustPan does not provide the desired behavior for our application, so it is not a viable workaround.
• The visual artifact appears to be related to keyboard/IME animations or inset handling during keyboard dismissal.
• A short screen recording demonstrating the issue is attached.
https://github.com/user-attachments/assets/ec291249-579b-4785-9841-27a69b085ef3
Could the MAUI team confirm whether this is a known regression in .NET MAUI 10, or advise if there is an issue with our configuration or page layout that could be causing this behavior?
### Steps to Reproduce
**Reproduction:**
The issue can be reproduced using a simple page containing:
• A title at the top
• An Entry
• Buttons near the bottom of the page
• SafeAreaEdges="{OnPlatform Android=All}"
• AdjustResize soft input mode
**XAML:**
```
```
**Code behind:**
```
namespace Pages.Test;
public partial class TestPage : ContentPage
{
public TestPage()
{
InitializeComponent();
}
}
```
### Link to public reproduction project repository
_No response_
### Version with bug
10.0.80
### Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
### Last version that worked well
9.0.120 SR12
### Affected platforms
Android
### Affected platform versions
_No response_
### Did you find any workaround?
_No response_
### Relevant log output
```shell
```
Contributor guide
Research direction
Start with the provided TestPage XAML and code-behind, then reproduce on Android 11/API 30 using AdjustResize and SafeAreaEdges="All". Compare keyboard dismissal behavior between .NET MAUI 9 and 10, focusing on the IME inset and animation path. Done means the page resizes smoothly without a black panel, flicker, or controls being obscured.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, csharp
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100