local tbDrink = native.newTextBox( centerX, centerY, 100, 25 ) tbDrink.text = "" tbDrink.isEditable = true tbDrink:addEventListener( "userInput", inputListener )
local function inputListener( event ) if event.phase == "began" then print( event.text ) elseif event.phase == "ended" then elseif event.phase == "editing" then print( event.newCharacters ) print( event.oldText ) end end
local dataOfMyList = { "Hot Coffee", "Iced Coffee", "Espresso", "Cappuccino", "Latte", "Americano" }
For example, if I put the letter “A” in the textBox , the word " Americano " will be displayed below allowing the user to selecte this word
Â