Am trying to understand the java code of it all. In the Widget demo there is local function row listener ( event ) , then we use the ( print ) call which seems very basic,(ha, i’m a noob). I want to make a baking app and put receipes in each row, then after tapped, each recipe and picture is stored in a table. So I’ll have a reciepe and a image after the rowListener has been tapped and complete. I don’t know where the for i = 1, 100 do starts and ends.
-- Handles row presses/swipes
local function rowListener( event )
local row = event.row
local background = event.background
------if event.phase == "press" then
does my | print( "Pressed row: " .. row.index )
code go here, | background:setFillColor( 0, 110, 233, 255 )
or is there more |
lines that are dependant off | row.textObj:setText( "Row pressed..." )
the if.event.phase | row.textObj:setReferencePoint( display.TopLeftReferencePoint )
| row.textObj.x = 20
------- end
elseif event.phase == "release" or event.phase == "tap" then
print( "Tapped and/or Released row: " .. row.index )
background:setFillColor( 0, 110, 233, 255 )
row.reRender = true
[import]uid: 88495 topic_id: 34745 reply_id: 334745[/import]