CommunityToolkit / Maui

The .NET MAUI Community Toolkit is a community-created library that contains .NET MAUI Extensions, Advanced UI/UX Controls, and Behaviors to help make your life as a .NET MAUI developer easier
https://learn.microsoft.com/dotnet/communitytoolkit/maui
MIT License
2.28k stars 402 forks source link

[BUG] Bottom Aligned Snackbar on Android Tablet is concealed #1591

Open mobilewares opened 11 months ago

mobilewares commented 11 months ago

Is there an existing issue for this?

Did you read the "Reporting a bug" section on Contributing file?

Current Behavior

When a Community Toolkit Snackbar is shown on Android Tablet and aligned vertically to the bottom of screen, it is mostly concealed by the bottom action bar. Please see image below (blue Snackbar).

image

This was observed on Android 13 tablet using .NET8 MAUI (8.0.3) & Community Toolkit MAUI 7.0.0.

Expected Behavior

The Snackbar should be displayed in the area assigned to the running App and not be concealed by elements outside the App.

Steps To Reproduce

Use the Snackbar on Android 13 when the bottom action bar has been enabled. Note: This is enabled by default when using the default 'tablet_h_dpi_13_5in' emulator provided by the Android SDK.

Link to public reproduction project repository

https://github.com/CommunityToolkit/Maui/tree/main/samples/CommunityToolkit.Maui.Sample

Environment

- .NET MAUI CommunityToolkit:7.0.0
- OS: Android 13
- .NET MAUI: 8.0.3

Anything else?

I have not included my own repro because this should be easily reproducible simply running any Community Toolkit example app that uses the snackbar. I linked to the source code here to allow this to be submitted.

vhugogarcia commented 11 months ago

After reviewing this issue in-depth, I found the issue actually exists, I'm sharing my findings below:

Workarounds

Source

This appears to be the source file that shows a snackbar: \CommunityToolkit.Maui\Alerts\Snackbar\Snackbar.android.cs I am thinking that Android 13+ is setting the bar as translucent or something that is doing this. I found in the web same issue with other apps and native Android.