Use An Edittext With Custom Keyboard
I am new to android. I am trying to create an application with a custom keyboard, used for the application only. Not a general keyboard for distribution. Basically my test is to ha
Solution 1:
The reason nothing is showing in the EditText is because you're not doing anything with the events when you receive them. You have to respond to the listener events and implement the key press yourself. Below is an example of how you could implement an action to add text.
@Override
public void onRelease(int primaryCode) {
Log.d(TAG, "onRelease? primaryCode=" + primaryCode);
myedit.setText(myedit.getText().toString() + getKeyForPrimaryCode(primaryCode));
}
Note: getKeyForPrimaryCode would just be a method you make which converts the primary code to the label on the key.
Post a Comment for "Use An Edittext With Custom Keyboard"