如何隐藏键盘上的浮动操作按钮? [英] How do you hide floating action buttons from the keyboard?

本文介绍了如何隐藏键盘上的浮动操作按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在CoordinatorLayouts中有FloatingActionButtons和FloatingActionMenus,但在里面也有一些EditText,使用AdjustPan窗口模式.但是,当我单击EditTexts时,浮动按钮/菜单随键盘一起出现,并在一定程度上阻挡了可见区域(例如包含EditText的行).我能以某种方式阻止浮动项目随键盘一起出现吗?

I have FloatingActionButtons and FloatingActionMenus in CoordinatorLayouts, but I also have some EditTexts in there too, with the adjustPan window mode. But when I go to click the EditTexts, the floating buttons/menus come up along with the keyboard and somewhat block the visible area (such as the row containing the EditText). Can I somehow prevent the floating items from coming up with the keyboard?

推荐答案

如果键盘是可见的,有一个可以监听键盘可见性的库.

There is a library which can listen to keyboard visibility, if the keyboard is visbile make the FAB to GONE or INVISIBLE.

https://github.com/yshrsmz/KeyboardVisibilityEvent

这篇关于如何隐藏键盘上的浮动操作按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆