I use this event to move the textbox up and down on the screen. It moves up when I tap in it but when I am done it does not. It used to. Is this a bug now?
Here is the event code:
local function onDesc( event ) if ( "began" == event.phase ) then transition.to( editGroup, { time=350, x=0, y=-550 } ) elseif ( "editing" == event.phase ) then local txt = event.text if(string.len(txt)\>300)then txtDesc.text = string.sub(txt, 1, 300) end elseif ( "ended" == event.phase ) then native.setKeyboardFocus( nil ) transition.to( editGroup, { time=350, x=0, y=0 } ) elseif ( "submitted" == event.phase ) then native.setKeyboardFocus( nil ) transition.to( editGroup, { time=350, x=0, y=0 } ) end end
Actually I realized it is working corrrectly. But what I was expecting is after I finish editing a textbox I thought I could tap anywhere outside of the textbox and the ended event would fire. But no event fires when you tap outside of the control. I have the display group moved up when I enter the textbox and wanted to move it back when done. The submit button for the screen is at the bottom and covered by the keyboard.
So how do most handle this? Should I have some sort of Done button near the textbox and when clicked hide the keyboard and put everything back in position?
Is there any way to have the Next or Go button included in the keyboard? Am I missing something?Or do I need to add my own buttons somewhere for Next and Done?
The return key will always add “\n” to the text in a TextBox (and it should),
so for a TextBox this is not a solution. Using this function will simply change the text of the return button but the functionality will stay the same.
Actually I realized it is working corrrectly. But what I was expecting is after I finish editing a textbox I thought I could tap anywhere outside of the textbox and the ended event would fire. But no event fires when you tap outside of the control. I have the display group moved up when I enter the textbox and wanted to move it back when done. The submit button for the screen is at the bottom and covered by the keyboard.
So how do most handle this? Should I have some sort of Done button near the textbox and when clicked hide the keyboard and put everything back in position?
Is there any way to have the Next or Go button included in the keyboard? Am I missing something?Or do I need to add my own buttons somewhere for Next and Done?
The return key will always add “\n” to the text in a TextBox (and it should),
so for a TextBox this is not a solution. Using this function will simply change the text of the return button but the functionality will stay the same.