rokudev / samples

Collection of sample channels for side-loading on your Roku device
MIT License
445 stars 286 forks source link

For Understanding : How to set background image on PosterGridView #18

Open chaklasiyanikunj opened 4 years ago

chaklasiyanikunj commented 4 years ago

I'm using a PosterGridView and display multiple posters in Roku. I use a transparent image in a poster. Is there any way to change background Like white or blue using a poster grid?

postergridviewbg

I used poster grid view like below :

<PosterGrid 
id = "ChannelPosterGrid" 
translation = "[ 10 , 10 ]" 
caption1NumLines = "2" 
caption2NumLines = "2"
numColumns="4"
numRows="6"
focusBitmapUri="pkg:/images/imagegrid.png"
itemSpacing = "[ 20, 20 ]" /> 

In a .brs file access like simply :

m.top.grid = m.top.findNode("ChannelPosterGrid")

I have tried three things

m.top.grid.backgroundURI = "pkg:/images/myImage.jpg" 'not work
m.top.backgroundURI = "pkg:/images/myImage.jpg" 'not work
scene.backgroundURI = "pkg:/images/white.jpg" 'Its set hole screen background 'scene is object of roSGScreen