roku - 如何创建项目宽度基于文本的行列表,
解决方案
这里是图像的 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中查找id
m.top.grid = m.top.findNode("ChannelPosterGrid")
显示 rawlist 的 Brightscript 代码:
sub showpostergrid()
? " I am in showpostergrid() "
m.top.grid.content = m.readPosterGridTask.content
' m.top.grid.FHDPosterUrl = m.readPosterGridTask.hdposterurl
end sub
用于读取 rawlist 的 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
推荐阅读
- html - HTML 电子邮件签名 CSS 在某些电子邮件客户端中不起作用
- php - 根据 Woocommerce 中的其他购物车项目数自动将特定产品添加到购物车
- python - 有没有办法在全黑的显示器上运行你的代码?(用于文字冒险)
- javascript - 根据时区自定义格式的javascript日期时间
- azure - Azure B4ms 虚拟机大小和 CPU 积分
- c++ - 通过 C/C++ 获取数据分叉大小,而不使用已弃用的 FSCatalogInfo 的 dataLogicalSize 字段
- html - 内容未正确对齐
- android - 改造 - 应用程序关闭/后台时不发送网络调用
- cuda - CUDA编程----如何理解CudaDeviceReset()
- spring - 为什么需要很长时间才能获得大量的 rest api 响应?