Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
panzhuli
Level 7

Turning off infinite looping in Markup Grid

Hi there -

I'm looking at the markup grid documentation and can't find any settings to disable the infinite looping. I want the user to be able to reach the end of my grid and not restart. Thoughts?

Thanks!
0 Kudos
3 Replies
joetesta
Level 10

Re: Turning off infinite looping in Markup Grid

Update: Pixshatter got it!
You could extend it, add a keyhandler (onKeyEvent) that eats (return true) any presses that would take it beyond the boundary... Might need to add the onKeyEvent in a child component of the extended MarkupGrid so it gets the presses first.  I think it'd be possible without going full custom component though, which is also an option if you're feeling wicked ambitious.
aspiring
0 Kudos
pixshatterer
Level 7

Re: Turning off infinite looping in Markup Grid

you need to set the attribute vertFocusAnimationStyle = "fixedFocus" (this is inherited from ArrayGrid)
0 Kudos
csangkravat
Level 7

Re: Turning off infinite looping in Markup Grid

Check with this link https://sdkdocs.roku.com/display/sdkdoc/ArrayGrid
or
Try this   
<MarkupGrid 
      id = "yourID" 
      translation = "[ 130, 160 ]" 
      numColumns = "2"
     vertFocusAnimationStyle = "fixedFocus"
      numRows = "5" 
      itemSize = "[ 532, 308 ]" 
      itemSpacing = "[ 20, 20 ]" 
      drawFocusFeedback = "false" />


fixedfocus, fixedFocusWrap, floatingFocus) at vertFocusAnimationStyle
0 Kudos