Is there a way to scroll an element into view?
#1
I'm modifying the estuary skin and i wanted to move subsections into a single page like a home screen.

Everything looks and works well but I thought it would be interesting to move all widgets to a single page then when navigating the main menu it would scroll down the page to that section.

"onfocus" works but if i set focus to the first element of say the tv shows, it takes focus from the menu and then it gets stuck because the menu puts focus back to the element.

I cant seem to find anything like this in the skinning references (or anywhere else) other than using scroll control pageup and pagedown which isn't what I'm going for.

So the question is, is there something like scrollintoview, the way you would use window.scrollto in javascript for a webpage?
Reply
#2
ive gone in a different direction this can be (/continue to be) ignored
Reply
#3
The way I navigate between my homescreen widgets is by using SetFocus ondown or onup, then having slide/fade animations based on if a widget has focus or not.

You could also try to wrap them in a grouplist, which might take care of the scrolling automatically, but you still might need to give a specific <onup><ondown> value to each widget for it to work, as I think buttons/lists inside of a group won't automatically know to point to the next item in the grouplist.


xml:

<control type="grouplist" id="9000">
    <control type="group id="9001>
        <defaultcontrol>90010</defaultcontrol>
        <control type="list" id="90010">
            <ondown>9002</ondown>
            ...
        </control>
    </control>
    <control type="group id="9002>
        <defaultcontrol>90020</defaultcontrol>
        <control type="list" id="90020">
            <onup>9001</onup>
            <ondown>9003</ondown>
            ...
        </control>
    </control>
    <control type="group id="9003>
        <defaultcontrol>90030</defaultcontrol>
        <control type="list" id="90030">
            <onup>9002</onup>
            <ondown>9001</ondown>
            ...
        </control>
    </control>
</control>

That's assuming that you need to wrap your widget in a list to include any other labels or whatever that make it up. If it's entirely contained within the list, then it might be easier and just putting the lists inside a grouplist might work.
Reply
#4
appreciate that

i made an android style home in kodi/estuary where there's widget rows per Home section i.e. Movies/TV Shows/TV/Addons/Favorites

without hiding the previous section and loading new content (since its using preload anyway) i got it to "scroll down" the content page to each section when highlighting the respective menu item with arrow up/down

and if the menu does not have focus, pageup/pagedown would also jump up and down each section

what i wanted: was to tag a specific "first item" widget row to have the window scroll into view each time the menu was highlighting or pageup/pagedown

what i ended up with: made each section's content exactly 1 page and then pageup/pagedown works and can be called from menu


and then it sucked so i scrapped it and just put pertinent widget rows and now there's no need to scroll because it all fits 1 page
Reply

Logout Mark Read Team Forum Stats Members Help
Is there a way to scroll an element into view?0