native text controller
Posted: Mon Sep 28, 2015 11:53 am
Hi everyone 
i need an idea how to show up android keyboard automatically using native text controller. the problem is that first i have to create the control, then click on it and only after that the keyboard shows up. Here is what i tried using this lesson http://lessons.runrev.com/m/4069/l/2911 ... -on-mobile
i called inputCreate in openfield but this didn't work for me, then i tried to call it on openCard to have the controller already created, but as i had more than one field, the keyboard appeared only on the last field.
thanks
Astghik

i need an idea how to show up android keyboard automatically using native text controller. the problem is that first i have to create the control, then click on it and only after that the keyboard shows up. Here is what i tried using this lesson http://lessons.runrev.com/m/4069/l/2911 ... -on-mobile
Code: Select all
on inputCreate pControll, pControlName, pType
put pControll into lCurrentFieldID
put pControlName into lCurrentFieldName
if "testinput" is among the lines of mobileControls() then
inputDelete
end if
mobileControlCreate "input", pControlName
mobileControlSet pControlName, "rect", the rect of pControll
mobileControlSet pControlName, "visible", true
mobileControlSet pControlName, "alpha", 0
mobileControlSet pControlName, "contentType", pType
mobileControlSet pControlName, "text", the text of pControll
inputFocus
end inputCreate
on inputFocus
mobileControlDo lCurrentFieldName,"enabled","true" //make sure the input is focus-able
mobileControlDo lCurrentFieldName, "focus" //actually focus on the field so the keyboard pops up, etc.
end inputFocus
thanks
Astghik