Device keyboard covers fragment content if BottomNavigationView is hide
When the keyboard in my application is open, the BottomNavigationView is attached to the keyboard. So I added in AndroidManifest android: windowSoftInputMode = "adjustPan"
but now the keyboard covers the bottom of the content. That is, ScrollView cannot change the maximum height to the keyboard. As if the fragment does not see when the keyboard is turned on. How can I show the keyboard so that the fragment adapts and the BottomNavigationView disappears. Help me pls.
Nothing can change the maximum height of the keyboard. The keyboard itself gets to decide that. There are only 2 actions you can take when the keyboard appears- pan or resize. The first will scroll your app so that the cursor appears on screen. The second will relayout your app in the space above the keyboard. Which if your screen is designed to can shrink extra space to make more stuff fit.
There is no option to hide certain views when the keyboard appears. There are hacks you can find that try to detect when the keyboard appears, but they all have flaws and ways they break. Android isn't set up to enable you to know when the keyboard is onscreen. You can try one of those, but more realistically you're going to live with this behavior.