groman00
Visitor

failedBitmapUri & loadingBitmapUri not working with examples

I've modified the SimpleRowList.zip example found here: https://sdkdocs.roku.com/display/sdkdoc/rowlist

My version utilizes the failedBitmapUri and loadingBitmapUri field, but neither seem to work for me. I've tried with the following modifications:

1. Load a high res image into the poster thumbnail, which should result in a visible loading period for the image.
2. Load a non-existent image, which should cause the poster to fail.

Here's modified project: https://www.dropbox.com/s/bbptomq2cx90k ... i.zip?dl=0

Here's the updated SimpleRowList.xml file, with two modifications:

<?xml version="1.0" encoding="utf-8" ?>
<component name="SimpleRowList" extends="RowList" >

<script type="text/brightscript" >
<![CDATA[

function init()
print "in SimpleRowListPanel init()"
m.top.itemComponentName = "SimpleRowListItem"

'' ----- MODIFIED CODE ----- ''
m.top.failedBitmapUri="pkg:/images/MainMenu_Icon_Side_SD43.png"
m.top.loadingBitmapUri="pkg:/images/MainMenu_Icon_Side_SD43.png"
'' ----- @END MODIFIED CODE ----- ''

m.top.numRows = 1
m.top.itemSize = [196 * 3 + 20 * 2, 213]
m.top.rowHeights = [213]
m.top.rowItemSize = [ [196, 213] ]
m.top.rowItemSpacing = [ [20, 0] ]
m.top.rowFocusAnimationStyle = "floatingfocus"
m.top.content = GetRowListContent()
m.top.visible = true
m.top.SetFocus(true)
m.top.ObserveField("rowItemFocused", "onRowItemFocused")
end function

function GetRowListContent() as object
'Populate the RowList content here
data = CreateObject("roSGNode", "ContentNode")
row = data.CreateChild("ContentNode")
for i = 1 to 3
item = row.CreateChild("SimpleRowListItemData")

'' ----- MODIFIED CODE ----- ''

'' This image should fail, but we don't see failedLoadingBitmapUri
item.posterUrl = "http://www.fake.com/this_picture_does_not_exist.jpg"

' This is high-res image should take time to load, but we don't see loadingBitmap Uri
'item.posterUrl = "http://www.hd-wallpapersdownload.com/upload/bulk-upload/high-resolution-lion-pictures.jpg"

'' ----- @END MODIFIED CODE ----- ''

item.labelText = "This is item" + stri(i)
end for
return data
print "Leaving GetRowListContent"
end function

function onRowItemFocused() as void
row = m.top.rowItemFocused[0]
col = m.top.rowItemFocused[1]
print "Row Focused: " + stri(row)
print "Col Focused: " + stri(col)
end function
]]>
</script>
</component>
Greg Roman
Senior Software Engineer, AOL Alpha
Tags (1)
0 Kudos
2 REPLIES 2
groman00
Visitor

Re: failedBitmapUri & loadingBitmapUri not working with exam

Also, if I add the attributes directly to the xml, I'll get an error.

=================================================================
Error creating XML component SimpleRowListScene
-- Error setting the "failedBitmapUri" field of a "RowList" node
-- Error found at line 18 of file pkg:/components/SimpleRowListScene.xml
=================================================================


<?xml version="1.0" encoding="utf-8" ?>

<component name="SimpleRowListScene" extends="Scene" >

<script type="text/brightscript" >
<![CDATA[
function init()
m.theRowList = m.top.FindNode("theRowList")
m.theRowList.SetFocus(true)
end function
]]>
</script>

<children>
<SimpleRowList
id="theRowList"
translation="[50,50]"
failedBitmapUri="pkg:/images/MainMenu_Icon_Side_SD43.png"/>
</children>
</component>
Greg Roman
Senior Software Engineer, AOL Alpha
Tags (1)
0 Kudos
groman00
Visitor

Re: failedBitmapUri & loadingBitmapUri not working with exam

Just following up on my own post. This is fixed in firmware 7.1.
Greg Roman
Senior Software Engineer, AOL Alpha
Tags (1)
0 Kudos
Community is Temporarily in Read-Only Mode!

We’re upgrading Roku Community to bring you a faster, more mobile-friendly experience. You may notice limited functionality or read-only access during this time. You will not be able to log in or post new comments or kudos during this time. Read more here.

Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 12 and you may notice reduced functionality. In the meantime, for additional assistance, visit our Support Site.

Thanks for your patience — we’re excited to share what’s next!