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

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 4
neoRiley
Visitor

Re: jumpToRowItem animated?

bump... anyone?
0 Kudos
joetesta
Roku Guru

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
Visitor

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
Visitor

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