AndroidUtilCode icon indicating copy to clipboard operation
AndroidUtilCode copied to clipboard

软键盘收起后又弹出了

Open Pinggo opened this issue 2 years ago • 2 comments

在业务中使用 showSoftInput(@NonNull final View view),切换键盘代码

            if (!isShowEmojiPanel) {
                KeyboardUtils.hideSoftInput(etMsgSend)
                showEmojiFragment()
            } else {
                KeyboardUtils.showSoftInput(etMsgSend)
                hideEmojiFragment()
            }
            isShowEmojiPanel = !isShowEmojiPanel

有一条路径必现软键盘收起后又弹出,查找是 imm.toggleSoftInput 导致,删除 imm.toggleSoftInput 这个代码后没问题了

Pinggo avatar Apr 23 '23 06:04 Pinggo

同上,如果bottomsheetdialog里有个edittext,弹起键盘后再关闭弹框,键盘又会弹起来。 dismiss里已经做了处理,依然不行

nbwzlyd avatar Jun 30 '23 13:06 nbwzlyd