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: 
eastWind
Channel Surfer

view elements on top of poster in Rowlist item disappearing on focusing

I have added a simple rectangle on the top of the poster in RowList item

like this 

 

<Poster id="itemPoster">
    <Group id="itemOverlay" visible="false">
        <Rectangle id="overlayBG" color="0x00000040" >
	    <LayoutGroup id="overlayContent" layoutDirection="horizontal" vertAlignment="center" itemSpacings="8" >
	        <Poster id="playIcon" loadSync="true" uri="pkg:/images/icon_play.png" />
	        <Label id="numTracks" font="font:SmallSystemFont" text="SomeText" color="0xDDDDDDFF"/>
            </LayoutGroup>
	</Rectangle>
    </Group>
</Poster>
<Rectangle id = "headerRect" width = "80" height = "20" color = "#0000" />

And in brs file, I gave a translation for the rectangle such that it will come on top of the poster.

 

But what is happening is whenever the focus is on one of the Row items, the top rectangles of the items getting disappeared.

I'm attaching the screenshots. Here you can see that yellow marked region with disappeared top rectangles, and red marked region showing items with the top rectangles.

dev.jpeg

Interestingly, if I give the translation for the rectangle to be in the bottom portion of the poster, everything working as expected, that no disappearing is occurring in case of focusing

2 REPLIES 2
Uguisu
Binge Watcher

Re: view elements on top of poster in Rowlist item disappearing on focusing

@eastWind  what is happening is the rectangle is being drawn outside of the default clippingRect of the rowlist so it won't be drawn. As far as I've been able to tell the way to fix this is too apply a translation to each itemPoster so that it moves down allowing things to drawn above the itemPoster

<Poster id="itemPoster"
'moving the objects down
translation = "[0,25]"
> <Group id="itemOverlay" visible="false"> <Rectangle id="overlayBG" color="0x00000040" > <LayoutGroup id="overlayContent" layoutDirection="horizontal" vertAlignment="center" itemSpacings="8" > <Poster id="playIcon" loadSync="true" uri="pkg:/images/icon_play.png" /> <Label id="numTracks" font="fontSmiley FrustratedmallSystemFont" text="SomeText" color="0xDDDDDDFF"/> </LayoutGroup> </Rectangle> </Group> </Poster> <Rectangle id = "headerRect" width = "80" height = "20" color = "#0000" />

 given your xml this is a possible way to translate it.
Hopefully this helps 

0 Kudos
eastWind
Channel Surfer

Re: view elements on top of poster in Rowlist item disappearing on focusing

I will check this solution. Thanks, @Uguisu for the reply.

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.