I just did this. You have to move them yourself. The fieldHandler gets called when you type in a field and moves them. I know I found this somewhere on the board so credit goes out to the original poster.
[lua]for i=1,8, 1 do
field[i] = native.newTextField( 15, 80, 150, tHeight, fieldHandler(function() return i end) )
end
local function fieldHandler (getObj)
return function (event)
local myObj=getObj()
if ( “began” == event.phase ) then
– This is the “keyboard has appeared” event
if myObj>5 then --only move using if the lower ones >5
for i=1,8, 1 do
if i < 6 then
field[i].y=field[i].y-1200 --move off screen
else
field[i].y=field[i].y-200 – just move up
end
end
end
elseif ( “ended” == event.phase ) then
– This event is called when the user stops editing a field: for example, when they touch a different field
if myObj>5 then
for i=1,8, 1 do
if i < 6 then
field[i].y=field[i].y+1200
else
field[i].y=field[i].y+200
end
end
end
elseif ( “submitted” == event.phase ) then
– This event occurs when the user presses the “return” key (if available) on the onscreen keyboard
– Hide keyboard
native.setKeyboardFocus( nil )
end
end
end[/lua] [import]uid: 65685 topic_id: 17014 reply_id: 63855[/import]