How do you hide floating action buttons from the keyboard?

若如初见. 提交于 2019-12-10 11:14:00

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/40274705/how-do-you-hide-floating-action-buttons-from-the-keyboard

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!