Hi all,
In my project, I created a scrolling list view by following the example post by Gilbert. See bellow for the link.
And the image for each list item is added in "callback = function(row) " when the list is created.
However, is there any way to update the image after the list was created without rebuilding the list again?
Thank you for your comments in advance.
local myList = tableView.newList{
data=data,
default=listItemBg\_white.png,
--backgroundColor={255,2552,255},
callback = function( row )
local g = display.newGroup()
local img = display.newImage(row.image)
g:insert(img)
img.x = math.floor(img.width\*0.5 + 6)
img.y = math.floor(img.height\*0.5)
local title = display.newText( row.title, 0, 0, native.systemFontBold, 14 )
title:setTextColor(255, 255, 255)
g:insert(title)
title.x = title.width\*0.5 + img.width + 6
title.y = 30
local subtitle = display.newText( row.subtitle, 0, 0, native.systemFont, 12 )
subtitle:setTextColor(180,180,180)
g:insert(subtitle)
subtitle.x = subtitle.width\*0.5 + img.width + 6
subtitle.y = title.y + title.height + 6
return g
end
}
[import]uid: 23306 topic_id: 7624 reply_id: 307624[/import]