简体   繁体   English

SoftKeyboard Android

[英]SoftKeyboard Android

Im working in an app to modify the sounds when I key is press in the android soft-keyboard. 我在一个应用程序中工作,以便在按下android软键盘时按键修改声音。 I have download the sample soft-keyboard from Google. 我从谷歌下载了样本软键盘。 Now Im trying to figure out how to add sound to each or all the keys. 现在我试图弄清楚如何为每个或所有键添加声音。

My question is: is it possible to assign a short customize sound to each key? 我的问题是:是否可以为每个键分配一个简短的自定义声音?

    Can i change this in the already implemented keyboard?

You can't... it's already built and some manufactures provide their own keyboard implementations. 你不能......它已经建成,一些制造商提供自己的键盘实现。

    Or should i make my own keyboard?

Yes, you must. 是的,你必须。

    If the latter is the case, how do i do that? Can i find the source code somewhere?

There are some open source projects of Keyboard implementations... for instance: 键盘实现有一些开源项目......例如:

https://github.com/g1011999/Gingerbread-Keyboard/
http://code.google.com/p/softkeyboard/

There you can learn how to write your own keyboard, which is completely different from writing a conventional app. 在那里,您可以学习如何编写自己的键盘,这与编写传统应用程序完全不同。

My suggestion is to create a new fork of the Gingerbread-Keyboard (this supports Android 2.2 or higher only)... and then implement that specific change you want. 我的建议是创建Gingerbread-Keyboard的新分支(仅支持Android 2.2或更高版本)...,然后实施所需的特定更改。 For one of my apps I did so, and it's far easier than implementing the keyboard from scratch. 对于我的一个应用程序,我这样做了,而且比从头开始实现键盘要容易得多。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM