In my Android app I am using android:windowSoftInputMode="adjustPan" in the manifest. When I show a snackbar before or after opening the keyboard, the container is pushed off the screen.

When I close the keyboard, it returns in place.

I can't change the soft input mode to adjustResize or else, is there any way to pin the snackbar to the screen instead of the root view?