Keyboard overlaps Textbox on Android 15+

Which layout?

It will always work with a scrollable layout. With non-scrollable layouts, at least one layout on the page must be a FillParent, and the page must have some free space, free of views, the height of the keyboard. Therefore, the most reliable layout for these applications is a scrollable layout.

So I don't need Button2 (necessarily).

Yes, but you need an extension. The patch does something similar but in native code.

if (Build.VERSION.SDK_INT > Build.VERSION_CODES.UPSIDE_DOWN_CAKE){

}else {
edgeToEdge(binding.root)
}
in kotlin , close edge to edge for android 15 and put android:fitsSystemWindows="true" in .xml