Design and implementation code of Android custom soft keyboard
I accidentally found the android.inputmethodservice.keyboard class, that is, Android can customize the keyboard class. I made a simple example for your reference.
The effects are as follows:
First look at the interface layout file
It can be seen from the layout file that there are two input boxes on the interface, one is the password input box, and there is a hidden keyboard control on the interface.
Create a new XML folder under res, and create qwerty.xml and symbols.xml files in the XML folder. Qwerty.xml is the alphabetic keyboard layout, and symbols.xml is the numeric keyboard layout, as shown below:
Qwerty.xml content
Symbols.xml content
KeydemoActivity.java
KeyboardUtil.java
The above is the whole content of this article. I hope it will be helpful to your study, and I hope you can support programming tips.