键盘处理仍是Android应用开发中的主要挫折。让我具体说明我的问题,我想提供动画软键盘外观。我知道这是不直接可行的,但是有人知道对此有任何解决方法/调整和技巧吗?
您可以尝试创建自定义软键盘并注册您的edittext来加载此键盘(看看可以使用https://android-arsenal.com/tag/232的大量自定义键盘)
一个例子是“ Floating KeyboardView” https://android-arsenal.com/details/1/5247向您展示了如何自定义键盘。
用作普通键盘视图和
在活动代码中声明
FloatingKeyboardView mCustomKeyboard = (FloatingKeyboardView) findViewById(R.id.keyboardview);
分配键盘布局
mCustomKeyboard.setKeyboard(new Keyboard(this, R.xml.numkbd));
注册编辑文本以使用它
mCustomKeyboard.registerEditText(R.id.edittext1);