Question

I have installed an android build of codename one on motorola atrix.

Now I have a textfield. WHen I click on the textfield, android's keyboard shows up.

I don't want that. I want to show Codename One's key board(white and transparent). How do i do that?

Was it helpful?

Solution

There is an API called Display.setDefaultVirtualKeyboard() but it probably won't work for Android since we use native input on Android always by default. The keyboard is the smaller issue, the copy/paste and other features available on these OS's are the main reason we chose the native keyboard.

You can file a bug on this and we can evaluate the complexity of adding something like this, but it will probably be a bit of a pain to fix.

OTHER TIPS

Ok, so with Shai's comment given above: this is how i got android to show codename one's keyboard.

Textfield field = new TextField();

        VirtualKeyboard vkb = new VirtualKeyboard();
        VirtualKeyboard.bindVirtualKeyboard(field, vkb);//binding the vkb to a particular textfield
        Display.getInstance().setDefaultVirtualKeyboard(vkb);

Now, the datachange listener for textfield works smooth. Also the hint of the textfield clears out when textfield receives focus.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top