(Confession: I’m using Corona from about a year ago, because I’m working on an old project and it behaves more comprehensibly than the compatibility mode of recent versions.)
I’m having trouble with native.textField. Once the user taps in it (on the device only) the keyboard pops up, taking up the lower half of the screen. Oops. My text field was in the lower half of the screen! As were its buddies. Most professional apps that I see, if the keyboard takes up the lower half the screen while the keyboard focus is in something in the lower half the screen, everything slides up so that I can still see where I’m typing. But not so here. The lower half of the screen, including the field with the keyboard focus, is hidden. And I cant tap out of it! Here’s my event handling code:
local function textListener( event )
peek.text = event.phase
if event.phase == “ended” or event.phase == “submitted” then
native.setKeyboardFocus(nil)
end
end
but I’m not getting an “ended” if I just tap in the background somewhere, and because it’s a numeric keyboard only, there is no Enter button so I can’t get a “submitted”.
How is this supposed to work?