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: 
kadina
Newbie

Why the items in all the rows of row list are getting repeated in brightscript

Below are the XML files.[/font][/size][/color][/font][/size][/font][/size][/color]


<?xml version="1.0" encoding="utf-8" ?>
<component name="BrowseScreen" extends="Group">
   <children>
       <!-- The main content -->
       <RowList id="BrowseRowList"
           itemComponentName="customItem"
           focusXOffset="[0]"
           itemSize="[1920,500]"
           numRows="3"
           drawFocusFeedback="false"
           rowFocusAnimationStyle="fixedFocusWrap"
           rowHeights="[500]"
           showRowLabel="[true]"
           rowLabelOffset="[[0,20]]"
           rowItemSpacing="[[0,40]]"
           showRowCounter="[false]"
           rowItemSize="[[250,273]]"
           variableWidthItems="[true]"
           translation="[70, 40]" />

   </children>

   <script type="text/brightscript" uri="pkg:/components/BrowseScreen/BrowseScreen.brs"/>
</component>




<?xml version="1.0" encoding="utf-8" ?>

<component name="customItem" extends="Group">
   <children>
       <Group id="itemCard" translation="[10, 10]" scale="[0.90, 0.90]"
              scaleRotateCenter="[125.0, 183.0]">

           <Poster id="itemPoster"
               width="250"
               height="375"
               failedBitmapUri="pkg:/images/placeholder/iptv_placeholder_2by3_dark.png"
               loadingBitmapUri="pkg:/images/placeholder/iptv_placeholder_2by3_dark.png"
               loadDisplayMode="scaleToZoom" />

           <Group id="itemMetaGroup"
               visible="false"
               translation="[0, 273]">

               <Rectangle id="itemMetaBG"
                   width="364"
                   height="102"
                   color="0x333333" />

               <Label id="itemMetaLabel"
                   width="320"
                   height="55"
                   color="0xebebeb"
                   opacity="1.0"
                   translation="[20, 20]"
                   horizAlign="left">
                   <Font role="font" uri="pkg:/fonts/Roboto-Bold.ttf" size="21" />
               </Label>

               <Label id="itemMetaData"
                   width="320"
                   height="55"
                   text="{MetaData}"
                   color="0x959595"
                   opacity="1.0"
                   translation="[20, 60]"
                   horizAlign="left">
                   <Font role="font" uri="pkg:/fonts/Roboto-Regular.ttf" size="21" />
               </Label>            
           </Group>
       </Group>

   </children>

   <script type="text/brightscript" uri="pkg:/components/Item/customItem.brs" />
   <script type="text/brightscript" uri="pkg:/components/Utils/itemType.brs" />
</component>


If I have 11 posters in each row, it is getting displayed as below
1 2 3 4 5 6 7 8 9 10 11 1 2 3 4 5 6 7 8 9 10 11 1 2 ...
I am unable to understand why the items are getting repeated. p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Helvetica Neue'; color: #454545} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Helvetica Neue'; color: #454545; min-height: 14.0px}
Later on I realized that changing rowFocusAnimationStyle="floatingFocus" and variableWidthItems="[false]" will fix the problem. But I am having variable width items in the same row. So I am not sure how to fix this issue with variable width items in the same row and the items shouldn't repeat in the row.



I considered using postergrid for this. But I need to draw a line after each row. So I haven't used postergrid.


Can any one please let me know how to fix this issue.
0 Kudos
3 REPLIES 3

Re: Why the items in all the rows of row list are getting repeated in brightscript

pls change the rowFocusAnimationStyle="fixedFocusWrap" property to rowFocusAnimationStyle="floatingFocus"
0 Kudos
cocotower
Roku Guru

Re: Why the items in all the rows of row list are getting repeated in brightscript

I think by default the items in a row will repeat if the total width of all items extends past the right edge of the defined rowlist area.  I actually like this because it's a convenient way of getting back to the first item without wearing the batteries out on your remote control.

 

 

 

0 Kudos
joetesta
Roku Guru

Re: Why the items in all the rows of row list are getting repeated in brightscript

Last time I tried, what you want to do is not possible with rowList component.  The only way to have variable width items is with a wrapping list.  It's one reason some companies have invested the huge effort to develop their own custom rowList component.

aspiring
0 Kudos