AlwaysLoveme / capacitor-plugin-safe-area

capacitor plugin to get safeArea info on Android and IOS, support Capacitor6
MIT License
66 stars 14 forks source link

Bug: Android 12 and bottom navigation bar #25

Closed malua closed 9 months ago

malua commented 10 months ago

Hey there,

thanks for the plugin!

I recently discovered an issue with Android 12 and bottom navigation bars. In this case the plugin returns e.g. 41 pixel for the bottom inset, although there is no real inset.

Is this something that can be fixed? Or can I detect the navigation bar somehow?

I am thankful for all inputs :)

image

drewjosh commented 9 months ago

I experience the same issue on Android 11 on a Nokia 8.1. There is a bottom inset, even though the app view stops before the safe area:

Screenshot_20240109-110104

malua commented 9 months ago

Try await SafeArea.setImmersiveNavigationBar();. That fixed the problem for us!

drewjosh commented 9 months ago

Try await SafeArea.setImmersiveNavigationBar();. That fixed the problem for us!

Amazing, thanks a lot for your fast response! 🚀 That worked as well for me. Many thanks!