can anybody help me with my table and how to add my own images instead of the default and how would make it go to another scene when one of them is pressed?
here is my code
galaxy s3 view
[lua] local widget = require “widget”
local listOptions = {
left = 100,
top = 50,
hideScrollBar = true,
height = 260,
width = 440,
}
local list = widget.newTableView( listOptions )
local function onRowTouch( event )
local row = event.target
local rowGroup = event.view
if event.phase == “press” then
if not row.isCategory then rowGroup.alpha = 0.5; end
elseif event.phase == “swipeLeft” then
print( “Swiped left.” )
elseif event.phase == “swipeRight” then
print( “Swiped right.” )
elseif event.phase == “release” then
end
return true
end
local function onRowRender( event )
local row = event.target
local rowGroup = event.view
local text = display.newRetinaText( “Row #” … event.index, 12, 0, “Helvetica-Bold”, 18 )
text:setReferencePoint( display.CenterLeftReferencePoint )
text.y = row.height * 0.5
if not row.isCategory then
text.x = 15
text:setTextColor( 0 )
end
rowGroup:insert( text )
end
for i=1,10 do
local rowHeight, rowColor, lineColor, isCategory
list:insertRow{
onEvent=onRowTouch,
onRender=onRowRender,
height=rowHeight,
isCategory=isCategory,
rowColor=rowColor,
lineColor=lineColor
}
end [import]uid: 218976 topic_id: 37041 reply_id: 67041[/import]