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: 
panzhuli
Visitor

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 3
joetesta
Roku Guru

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
Visitor

Re: Turning off infinite looping in Markup Grid

you need to set the attribute vertFocusAnimationStyle = "fixedFocus" (this is inherited from ArrayGrid)
csangkravat
Visitor

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