Forum Discussion

chaklasiyanikun's avatar
6 years ago

How to set background image on PosterGridView in Roku

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?

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  

5 Replies

  • Here, I set an image using hdposterurl and sdposterurl. But, Here I getting a transparent image with black color. And My background is also black. So, The Image is mixed-up with the background. So, I required to find a way to put a white rectangle behind of image. It's Possible with RowList. Because of the Poster node used inside a RowList. But, I try to find out with PosterGrid. Any Solution for this issue.

    • necrotek's avatar
      necrotek
      Roku Guru

      It would be nice if poster grid had an "itemComponentName" field.  Have you tried "imageWellBitmapUri"?

      • chaklasiyanikun's avatar
        chaklasiyanikun
        Roku Guru

        I tried this field(imageWellBitmapUri). But, It does not work with Empty Poster Grid in my case And I don't try to do this way. I tried to put a white image or Rectangle behind the black transparent images. I required it because here my images are black transparent and my background is also black. So, Images Merged with the background.
        I want to do something like this in the PosterGrid. Here Sample in Poster Node.

        <Rectangle id="testRectangle" color="0xFFFFFFFF">
        <Poster id="poster"/>
        </Rectangle>