开发者

How to develop a custom Soft Keyboard for Android application?

开发者 https://www.devze.com 2023-03-27 13:18 出处:网络
I\'ve got an Math related application I\'ve made that I really would like to make a custom soft keyboard for. It would have attributes like a numpad and special characters like pi and square root symb

I've got an Math related application I've made that I really would like to make a custom soft keyboard for. It would have attributes like a numpad and special characters like pi and square root symbols built in. I would want it to replace to default keyboard just for that application, and only open the keyboard that I develop for this app. My question is how do I do that? Do I mak开发者_运维百科e a "keyboard" out of table layouts and a bunch of buttons that opens when I click on the text field, or do I make use of the keyboard layout?


You should not create a table layout and a bunch of buttons, it is an unfamiliar user interface and creates a bad user experience. See this answer about how to create a custom soft keyboard that is identical to the platform soft keyboard but contains the keys you need: android app specific soft keyboard


You could make a RelativeLayout, with rows of buttons like a keyboard at the bottom of the screen(using Linear layouts), or if you need to have a system wide keyboard, I'd look at Hackerskeyboard source for an example.

0

精彩评论

暂无评论...
验证码 换一张
取 消