Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
groman00
Level 7

loadingBitmapUri not working

I'm trying to use the loadingBitmapUri for a RowList as described here: https://sdkdocs.roku.com/display/sdkdoc/RowList

When I set that field to to an image in my project I get the following error:
=================================================================
Error creating XML component HomeScreen
-- Error setting the "loadingBitmapUri" field of a "RowList" node
-- Error found at line 20 of file pkg:/components/screens/HomeScreen/HomeScreen.xml
=================================================================

I've also tried setting the field on a Poster and I get a similar error. What's the proper usage of loadingBitmapUri?
Greg Roman
Senior Software Engineer, AOL Alpha
0 Kudos
16 REPLIES 16
BCVatOVG
Level 7

Re: loadingBitmapUri not working

Can you post the contents of pkg:/components/screens/HomeScreen/HomeScreen.xml
0 Kudos
groman00
Level 7

Re: loadingBitmapUri not working


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

<component name="HomeScreen" extends="Group">

<script type="text/brightscript" uri="pkg:/components/screens/HomeScreen/HomeScreen.brs" />

<interface>
<field id="playlists" type="node"/>
</interface>

<children>

<RowList
id="videoList"
visible="false"
itemComponentName="PosterItemHero"
itemSize = "[1920, 785]"
rowItemSize = "[[1400, 785]]"
focusXOffset = "[262]"
showRowLabel="false"
showRowCounter="false"
rowFocusAnimationStyle="fixedFocusWrap"
failedBitmapUri="pkg:/images/placeholder-image.png"
focusBitmapUri="pkg:/images/9-patch/focus_thumbnail_home.9.png"
translation="[0, 38]" />

</children>

</component>
Greg Roman
Senior Software Engineer, AOL Alpha
0 Kudos
BCVatOVG
Level 7

Re: loadingBitmapUri not working

I don't get it...I don't see the use of loadingBitmapUri in your XML.
0 Kudos
BCVatOVG
Level 7

Re: loadingBitmapUri not working

But I do see one mistake on line 20

showRowLabel = "false"

It's supposed to be an array of boolean
https://sdkdocs.roku.com/display/sdkdoc/RowList
"Specifies whether the row label on the left edge of each row is displayed. If the array contains fewer elements than the number of rows in the data model, the last value in array is used to control the display of the row label for the extra rows. If the array contains no values, no row labels are displayed."

So try:
showRowLabel = "[false]"

and see if that works. I suspect you are setting loadingBitmapUri in HomeScreen.brs but because it can't load the XML RowList component, you don't actually get a correct RowList node is my best guess.
0 Kudos
groman00
Level 7

Re: loadingBitmapUri not working

"BCVatOVG" wrote:
I don't get it...I don't see the use of loadingBitmapUri in your XML.


Ahh, I made a mistake when I posted the code. I removed the field from my code because it was breaking, and when I posted the example code i typed failedBitmapUri instead of loadingBitmapUri.

Here it is:


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

<component name="HomeScreen" extends="Group">

<script type="text/brightscript" uri="pkg:/components/screens/HomeScreen/HomeScreen.brs" />

<interface>
<field id="playlists" type="node"/>
</interface>

<children>

<RowList
id="videoList"
visible="false"
itemComponentName="PosterItemHero"
itemSize = "[1920, 785]"
rowItemSize = "[[1400, 785]]"
focusXOffset = "[262]"
showRowLabel="false"
showRowCounter="false"
rowFocusAnimationStyle="fixedFocusWrap"
loadingBitmapUri ="pkg:/images/placeholder-image.png"
focusBitmapUri="pkg:/images/9-patch/focus_thumbnail_home.9.png"
translation="[0, 38]" />

</children>

</component>
Greg Roman
Senior Software Engineer, AOL Alpha
0 Kudos
groman00
Level 7

Re: loadingBitmapUri not working

"BCVatOVG" wrote:
But I do see one mistake on line 20

showRowLabel = "false"

It's supposed to be an array of boolean
https://sdkdocs.roku.com/display/sdkdoc/RowList
"Specifies whether the row label on the left edge of each row is displayed. If the array contains fewer elements than the number of rows in the data model, the last value in array is used to control the display of the row label for the extra rows. If the array contains no values, no row labels are displayed."

So try:
showRowLabel = "[false]"

and see if that works. I suspect you are setting loadingBitmapUri in HomeScreen.brs but because it can't load the XML RowList component, you don't actually get a correct RowList node is my best guess.


Tried changing the value to an array, but it made no difference. Also tried adding the code in my brs file, but still not seeing the image.


m.videoList.loadingBitmapUri = "pkg:/images/placeholder-image.png"
Greg Roman
Senior Software Engineer, AOL Alpha
0 Kudos
groman00
Level 7

Re: loadingBitmapUri not working

@BCVatOVG here's some stripped down code using one of the rowlist examples provided by the roku docs:
https://www.dropbox.com/s/8i2bbhov5zec8 ... t.zip?dl=0
Greg Roman
Senior Software Engineer, AOL Alpha
0 Kudos
BCVatOVG
Level 7

Re: loadingBitmapUri not working

I downloaded and un-commented out the code in SimpleRowListScene.xml and ran it fine without any errors.

<?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.theRowList2 = m.top.FindNode("theRowList2")
m.theRowList.SetFocus(true)


end function
]]>
</script>

<children>
<!-- This Causes an Error -->
<!--
=================================================================
Error creating XML component SimpleRowListScene
Error setting the "loadingBitmapUri" field of a "RowList" node
Error found at line 19 of file pkg:/components/SimpleRowListScene.xml
=================================================================
-->
<SimpleRowList
id="theRowList"
loadingBitmapUri="pkg:/images/MainMenu_Icon_Side_SD43.png"
translation="[50,50]" />
</children>
</component>


I tested on Roku 4 (4400X) Firmware 7.1.0 build 4062-17

What device/firmware are you testing on?
0 Kudos
BCVatOVG
Level 7

Re: loadingBitmapUri not working

Also tested without any errors on:
1. Roku Streaming Stick (3600X) - 7.1.0b4073-24
2. Roku TCL TV (5000X) - 7.1.0b4055-08
3. Roku 1 (2710X) - 7.1.0b4062-06
0 Kudos