Skip to main content

Android implementation and VKB

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
4 replies [Last post]
Klemens Guest
Offline
Joined: 2010-11-12
Points: 0

Hi,
Upgrading to the latest LWUIT source broke the Android implementation, I
had to comment out some methods in order to compile.

Now the problem is that when I click on a TextField LWUIT's virtual
keyboard shows up, but instead Android's keyboard should show up, like
it did before.

Thanks,
Klemens

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
thorsten_s
Offline
Joined: 2008-08-15
Points: 0

At least for TextField LWUIT seems to default now to the LWUIT virtual keyboard. I did not have an in-depth look at this yet, but you can register your own keyboard with the Display singleton. There are some methods now that accept VirtualKeyboardInterface implementations. I would implement a custom implementation of the VirtualKeyboardInterface class and direct the method calls to the LWUIT implementation class for Android. Then register your implementation with the Display class and set it as defautl. That should do the trick.

Did I understand you right, the implementation from the incubator does not compile properly against current SVN LWUIT ?

klemensz
Offline
Joined: 2007-02-25
Points: 0

I will try that...Which methods in the AndroidImplementation do you mean?
The implementation from the incubator doesn't compile because of the @Override annotations. I commented them out and now it works. The methods concerning the VKB were removed from the LWUITImplementation. With LWUIT's own VKB on Android another problem is that the back-button doesn't close the VKB.

thorsten_s
Offline
Joined: 2008-08-15
Points: 0

public void setShowVirtualKeyboard(boolean show) in AndroidImplementation.java

klemensz
Offline
Joined: 2007-02-25
Points: 0

Thanks. That seems to work. Altought it required some modifications to get access to the AndroidImplementation.