
groman00
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2016
07:34 AM
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:
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
Senior Software Engineer, AOL Alpha
2 REPLIES 2

groman00
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2016
07:48 AM
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
=================================================================
=================================================================
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
Senior Software Engineer, AOL Alpha

groman00
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2016
10:50 AM
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
Senior Software Engineer, AOL Alpha