здесь компонент XML для изображения:
<PosterGrid
id = "ChannelPosterGrid"
translation = "[ 10 , 10 ]"
caption1NumLines = "2"
caption2NumLines = "2"
numColumns="4"
numRows="6"
focusBitmapUri="pkg:/images/imagegrid.png"
itemSpacing = "[ 20, 20 ]" />
Во-первых, функция init () для поиска идентификатора в postergrid
m.top.grid = m.top.findNode("ChannelPosterGrid")
Код Brightscript для шоу rawlist:
sub showpostergrid()
? " I am in showpostergrid() "
m.top.grid.content = m.readPosterGridTask.content
' m.top.grid.FHDPosterUrl = m.readPosterGridTask.hdposterurl
end sub
Код Brightscript для чтения необработанного списка:
sub readpostergrid()
'? "I am in readpostergrid() " m.top.gridcontenturi
'the code of roPosterGrid
m.ChannelPosterGrid = m.top.FindNode("ChannelPosterGrid")
m.readPosterGridTask = createObject("roSGNode", "XmlReader")
' screen = createobject("roParagraphScreen")
' m.readPosterGridTask.backgroundColor = "008000"
m.readPosterGridTask.contenturi = m.top.gridcontenturi
m.readPosterGridTask.observeField("content", "showpostergrid")
' m.readPosterGridTask.contenturi = "pkg:/xml/AllChannel.xml"
' m.readPosterGridTask.contenturi = "http://api.delvenetworks.com/rest/organizations/59021fabe3b645968e382ac726cd6c7b/channels/1cfd09ab38e54f48be8498e0239f5c83/media.rss" 'Roku rss XML
m.readPosterGridTask.color = "008000"
' screen.AddParagraph("Hello Nikunj")
m.readPosterGridTask.control = "RUN"
end sub