The activity that contains the button or buttons in the android manifest adds the following attribute:
android:windowSoftInputMode="adjustResize"
The result would be:
<activity
android:windowSoftInputMode="adjustResize"
>
In the xml of the activity that contains the buttons, add this attribute in the layout that contains the button:
android:fitsSystemWindows="true"
If it is a single layout that contains all the other buttons or textviews, you put it to that, if the button is inside an X layout that in turn is inside another layout And that would be the global, the attribute will go in the layout x, that is, put it in the layout where the buttons are located.