Android Keyboard questions

2 things.

1. On Androids with physical keyboards. Is there a way to detect if the physical keyboard has been activated/deactivated? Since I get more screen real estate when the virtual keyboard goes away, and less when it does appear I would like to reposition the items on the screen when this event happens.

2. When the virtual keyboard is in landscape mode, half of the screen is the keyboard and the other half is a big inputField. None of the game can be seen. However, the actual input field that I created was much smaller, so I don't quite understand why this happens. This huge input field does seem to be the same field as the one I created because the game responds correctly after I hit "enter" on the keyboard. Is this some kind of Android setting?

Thanks!

I tried this with the Corona sample code project "NativeDisplayObjects" and it has the same issue.

This happens after you test the Android build on the actual device. When you rotate to landscape and then tap the inputField to bring up the keyboard, the keyboard comes up along with a huge editField that covers the rest of the screen.

This was tested on an Motorola Droid with a physical keyboard.

So it seems like it is designed to do this, but there must be a way to control it and get rid of it. It seems like there should be another keyboard or textField setting somewhere.

After some googling, I found some people mentioning the large textfield that appears in landscape mode. Someone suggested using this to disable it (not LUA though):

editText.setImeOptions(EditorInfo.IME_FLAG_NO_EXTRACT_UI)

So this looks like an option that can be controlled when creating the textfield.

Has anybody else had to deal with this?

I just noticed that using the facebook API doesn't succumb to this huge edit field issue.

When I call up the facebook.login(), the facebook screen pops up. When I am in landscape mode and then tap one of the textfields, the keyboard comes up, but without that giant text field. So maybe this is already controllable in Corona?

views:1562 update:2011/12/30 9:10:41
corona forums © 2003-2011