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: 
eastWind
Level 7

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="fontSmiley FrustratedmallSystemFont" 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

0 Kudos
1 REPLY 1\
Uguisu
Level 8

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