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

jumpToRowItem animated?

I'm working with RowList and would like to animate to a row item.  There's animateToItem() which takes you to a new row with a quick animation, but is there an animateToRowItem()?

the other thought was to simulate a "right" remote button push, but that'd be a touch hackish...

Thanks for any help - John
0 Kudos
4 Replies
neoRiley
Level 7

Re: jumpToRowItem animated?

bump... anyone?
0 Kudos
joetesta
Level 10

Re: jumpToRowItem animated?

No, there is no such pre-built function.
Assuming jumpToRowItem does not do what you need, you could conceivably customize this functionality on your own by building up the screen using lower level components, although that's much more complicated than using the pre-built components, it gives more flexibility.
You could also ask RokuCo to add this functionality in an upcoming release, maybe you'll get lucky.
aspiring
0 Kudos
neoRiley
Level 7

Re: jumpToRowItem animated?

Ok thanks for confirming.  I hadn't found any solutions since posting and so this must be the case.
0 Kudos
neoRiley
Level 7

Re: jumpToRowItem animated?

I was able to solve this by using a MarkupGrid and setting the numRows=1


<MarkupGrid
    id="carousel"
    itemComponentName="UIFeaturedItem"
    itemSize="[1280,570]"
    numRows="1"
    horizFocusAnimationStyle="FixedFocusWrap"
    drawFocusFeedback ="false"
/>



Then I was able to use animateToItem(index) to have it smoothly scroll:

function onTimerFired()
    index = m.carousel.itemFocused
    if( index = m.featureItemCount-1 )
        index = 0
    else
        index++
    end if
    
    m.carousel.animateToItem = index
end function


hth - John
0 Kudos