List OnRowRender Corona SDK 1076不显示数据
下午好 在列表中显示表格内容时出现问题。该操作不会给每行中的数据留下印象,也不理解原因 我有1076版本的Corona SDK,但不起作用,但如果以前的版本起作用的话 我希望你能帮助我List OnRowRender Corona SDK 1076不显示数据,list,widget,coronasdk,List,Widget,Coronasdk,下午好 在列表中显示表格内容时出现问题。该操作不会给每行中的数据留下印象,也不理解原因 我有1076版本的Corona SDK,但不起作用,但如果以前的版本起作用的话 我希望你能帮助我 local function onRowRender( event ) print("oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo") local phase = event.phase local r
local function onRowRender( event )
print("oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo")
local phase = event.phase
local row = event.row
local rowGroup = event.view
local label = aux.corrigeEspeciales (rowTitles[ row.index ])
local color = 20
print ("label" .. label)
row.itemName = label
row.textObj = display.newRetinaText(rowGroup,label, 0, 0, "Verdana", 12 )
row.textObj:setTextColor( color )
row.textObj:setReferencePoint( display.CenterLeftReferencePoint )
row.textObj.x, row.textObj.y = 20, rowGroup.contentHeight * 0.5
rowGroup:insert( row.textObj )
row.arrow = display.newImage( "images/tiendarowArrow.png", false )
row.arrow.x = rowGroup.contentWidth - row.arrow.contentWidth * 2
row.arrow.y = rowGroup.contentHeight * 0.5
rowGroup:insert( row.arrow )
end
您可以使用以下方式显示2013.1076 Corona SDK版本中的文本信息:
local phase = event.phase
local row = event.row
local rowGroup = event.view
local label = aux.corrigeEspeciales (rowTitles[ row.index ])
local color = 20
row.itemName = label
local rowTitle = display.newText(row,label, 0, 0, "Verdana", 12 )
rowTitle.x = row.x - ( row.contentWidth * 0.5 ) + ( rowTitle.contentWidth * 0.5 )
rowTitle.y = row.contentHeight * 0.5
rowTitle:setTextColor( 0, 0, 0 )
我认为Corona1076使用了Widget2.0小部件。它们需要不同的语法来确定行组。请参阅这篇关于将小部件更新为新语法的文章 此外,还有一个新的公共构建1135,其中包含对小部件库的大量错误修复。我建议升级,以便您有这些修复程序