flynt7111
Newbie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2018
03:18 PM
How to change the focused postion of MarkupList
Hi. In default setting, the MarkupList always focus on the top item in the list while the rest of the list item is rolling vertically.
Is the a way to set the focus position to the middle of the list instead?
Example:
Init state: A, B,, D, E
Press down: B, C,, E, A
Press down: C, D,, A, B
I have tried with all MarkupList properties on sdkdocs but no luck.
Is the a way to set the focus position to the middle of the list instead?
Example:
Init state: A, B,
Press down: B, C,
Press down: C, D,
I have tried with all MarkupList properties on sdkdocs but no luck.
5 REPLIES 5
taylorcw
Streaming Star
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2018
09:42 PM
Re: How to change the focused postion of MarkupList
Hey, you would use the jumpToItem. ( https://sdkdocs.roku.com/display/sdkdoc/MarkupList )
m.markuplist = m.top.findNode("someField“)
m.markuplist.content = some content data
m.markuplist.jumpToItem = 2
Make sure the content data is given first. If you have to build the content list, use an observeField event, waiting for content.
m.markuplist = m.top.findNode("someField“)
m.markuplist.content = some content data
m.markuplist.jumpToItem = 2
Make sure the content data is given first. If you have to build the content list, use an observeField event, waiting for content.
flynt7111
Newbie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2018
01:38 PM
Re: How to change the focused postion of MarkupList
Thanks @tarlorcw. But sorry, it's not the answer for my case though. If you use the jumpToItem, that item will jump to the top of the list and get focused.
What I expect is the focused item in the middle of the list instead on top.
I managed to found a work around solution by modifying the itemData ContentNode though.
What I expect is the focused item in the middle of the list instead on top.
I managed to found a work around solution by modifying the itemData ContentNode though.
Veeta
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2018
05:21 AM
Re: How to change the focused postion of MarkupList
See if 'focusRow' works for you. It's documented in ArrayGrid which should be a basis for MarkupList.
norcaljohnny
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2018
09:48 PM
Re: How to change the focused postion of MarkupList
"flynt7111" wrote:
Hi. In default setting, the MarkupList always focus on the top item in the list while the rest of the list item is rolling vertically.
Is the a way to set the focus position to the middle of the list instead?
Example:
Init state: A, B,, D, E
Press down: B, C,, E, A
Press down: C, D,, A, B
I have tried with all MarkupList properties on sdkdocs but no luck.
Do you mean something like this where it stays in the middle at all times...
numColumns=5
numRows=3
focusRow=1 //focus columns and rows index starts at 0
focusColumn=2
vertFocusAnimtationStyle=fixedFocus
or where it floats up and down the center...
numColumns=5
numRows=3
focusColumn=2 //focus columns and rows index starts at 0
vertFocusAnimtationStyle=floatingFocus
flynt7111
Newbie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2018
03:19 PM
Re: How to change the focused postion of MarkupList
Thanks norcaljohnny.
Yeah, the first option is what I need. We need to add the "vertFocusAnimtationStyle=fixedFocus" to get this effect.[/font]
Yeah, the first option is what I need. We need to add the "vertFocusAnimtationStyle=fixedFocus" to get this effect.[/font]