Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
chaklasiyanikun
Roku Guru

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?

postergridviewbg.png

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  
0 Kudos
5 REPLIES 5
chaklasiyanikun
Roku Guru

Re: How to set background image on PosterGridView in Roku

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.

0 Kudos
necrotek
Roku Guru

Re: How to set background image on PosterGridView in Roku

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

0 Kudos
chaklasiyanikun
Roku Guru

Re: How to set background image on PosterGridView in Roku

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>
0 Kudos
KiranPrasanna
Channel Surfer

Re: How to set background image on .brs file in task folder

Hello,

I have changed background image in .brs file in task node folder but it is not updated. 

I need to change the background image in .brs file in task node folder. Please provide me the information.

 

I have set the Background image like this

m.background = m.top.findNode("background")
m.background.uri = "pkg:/images/Envoi.jpg"
0 Kudos
speechles
Roku Guru

Re: How to set background image on .brs file in task folder

You want to migrate everything from the PosterGrid into the MarkupGrid. MarkupGrid has an ItemComponentName you can extend to build whatever you need logic/render wise.

The PosterGrid is for porting old SDKA applications into a standard look without having to design anything.

SHORTDESCRIPTIONLINE1stringThe text for the first grid item caption.
SHORTDESCRIPTIONLINE2stringThe text for the second grid item caption.

 

The PosterGrid is just an old repurposed roGridScreen. Those fields are originally from the roGridScreen.

PosterGrid is (practically?!) useless. In most cases you will want to immediately forget it even exists and skip right to MarkupGrid, learn it, and implement that instead.

I cannot understand why PosterGrid is not deprecated out.

 

0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.