setAboveKeyboard

fun FragmentActivity.setAboveKeyboard(view: View, parent: ViewGroup = view.parent as ViewGroup, onKeyboardChanged: (keyboardVisible: Boolean, keyboardHeight: Int) -> Unit? = null)

设置当前视图始终显示在键盘之上

Parameters

view

需要悬浮在键盘之上的视图

parent

当键盘显示隐藏时需要滚动的视图

onKeyboardChanged

键盘是否显示和高度回调