0

I am experimenting with custom ime on android. The sample SoftKeyboard app seems to show everything I need except how to make the keyboard look like the standard one (colors, hover effects, sizes etc.). It seems like reusing resources from the standard keyboard sources could work, but I receive errors when trying to compile them like:

error: Error: No resource found that matches the given name: attr android:layout_alignParentStart'.

Commenting these errors produce lots of other XML errors, like:

error: No resource identifier found for attribute 'additionalMoreKeys' in package 'com.android.inputmethod.latin' key_f1.xml

Is there some semi automatic a way to fix these errors and make them compile?

I have got the sources from here: https://android.googlesource.com/platform/packages/inputmethods/LatinIME/+/android-4.4.2_r2

Thanks in advance.

Nostradamus
  • 668
  • 6
  • 18

3 Answers3

0

You could browse the android source code: android.inputmethodservice.KeyboardView and android.inputmethodservice.Keyboard and look for the specific behaviour you want.

seb
  • 4,279
  • 2
  • 25
  • 36
0

The keyboard found in android is open source, along with most of the other packages found in the OS. You can see the code here: https://android.googlesource.com/platform/packages/inputmethods/LatinIME/+/android-4.4.2_r2

Noob
  • 534
  • 1
  • 8
  • 16
0

That depends on your purpose. If you want to create keyboard specifically to any activity then follow below tutorial.

http://tutorials-android.blogspot.in/2011/06/create-your-own-custom-keyboard-for.html

Or if you want to create keyboard that will replace default keyboard in all applications then following answer will be helpful to you.

https://stackoverflow.com/questions/14806087/android-facebook-emoji-keyboard/14826813

As you said you want to change layout of keyboard then read this.

Community
  • 1
  • 1
baldguy
  • 2,090
  • 1
  • 16
  • 25
  • I need to replace the default keyboard and I already have found a number of examples and other information in this regard. The problem I am still having is how to make my keyboard look as similar to the standard one as possible. – Nostradamus Mar 12 '14 at 08:44
  • check this answer hope that helps you somewhat.. http://stackoverflow.com/questions/14528178/how-can-i-implement-special-soft-keyboard/14580859 – baldguy Mar 13 '14 at 13:12
  • Thanks, this should be enough to push me in the right direction. – Nostradamus Mar 14 '14 at 10:24