On Nexus 7, when click a edit area( textbox or textfield), the Android keyboard will pop up. And the Android back button will become to the dismiss keyboard button ( cause it's a tablet ).
But when the dismiss button is pressed, I can not capture the pressed event.
In this way,
function onKeyEvent( event ) local keyname = event.keyName; print("main.lua got a key event",keyname) end Runtime:addEventListener( "key", onKeyEvent )
or this way,
local function subjectFieldListener( event ) print("got event",event.phase) end end self.chatInputField:addEventListener( "userInput", subjectFieldListener )
Both ways couldn't receive a event when the dismiss keyboard button was pressed.
And on iPad, iPad's keyboard has a dismiss key too. When the dismiss button was pressed, the textfield will get a 'end' event of "userInput". So the dismiss button works will on iOS tablet.
Why the android tablet can't get a event when the dismiss button was pressed as the iOS devise?
Or is there other way to get this event captured ?
Thank you guys for reply. Good day.