开发者

changing sound/click on soft keyboard - android

I need some 开发者_StackOverflow中文版help with a project i'm doing. Hopefully someone can help me :)

I need to change the sound or click the keyboard makes whenever i'm typing in an editText. I need the sound/click to be whatever sound i may prefer (in wave-, mp3- or whatever format).

So, a couple of questions:

  • Can i change this in the already implemented keyboard?
  • Or should i make my own keyboard?
  • if the latter is the case, how do i do that? Can i find the source code somewhere?

I have been looking at other questions regarding how to make your own keyboard. e.g. How do I make my own keyboard for an app in android? And if i have to make my own keyboard i want to look like this. But how to do it?


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. For one of my apps I did so, and it's far easier than implementing the keyboard from scratch.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜