已经在清单中使用 android:windowSoftInputMode="adjustResize" 请提出解决方案? 尝试使用 NestedScrollView 但不起作用,它可以工作,但是当我通过手指滚动屏幕时,按钮可以显示。请提供一些解决问题的建议
隐藏键盘
val insets = ViewCompat.getRootWindowInsets(view) // view can be edittext or root view
insets?.let {
val insetsController = WindowCompat.getInsetsController(window,view)
// Show Keyboard if not visible
if (!it.isVisible(WindowInsetsCompat.Type.ime())){
insetsController.show(WindowInsetsCompat.Type.ime())
}
// Hide Keyboard
insetsController.hide(WindowInsetsCompat.Type.ime())
}