Kodi Community Forum

Full Version: Navigating through containers with conditional visibility in a grouplist
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, on my movieinformation dialog, I have grouplist containing a series of widgets, which are lists populated by the <content> field. Each widget has a unique list id a unique group id. The list id is selected as the group's default control.

Currently, I navigate from one item to the next by pointing at the next/previous groupid in the ondown/onup tags. Which works fine until one of the lists is hidden (e.g. if movie is NOT in a set, it won't show setlist widget). At this point, the navigation breaks when the currently container has an <ondown> that points to the id of a hidden container. I tried adding allowhiddenfocus="true" but then that means you need multiple button presses between displaying items.

Is there a way to automate this process so the grouplist figures out which controls will be visible/hidden aaand then just scroll through the visible ones when up or down are pressed?
(2020-09-27, 01:20)QuizKid Wrote: [ -> ]Hello, on my movieinformation dialog, I have grouplist containing a series of widgets, which are lists populated by the <content> field. Each widget has a unique list id a unique group id. The list id is selected as the group's default control.

Currently, I navigate from one item to the next by pointing at the next/previous groupid in the ondown/onup tags. Which works fine until one of the lists is hidden (e.g. if movie is NOT in a set, it won't show setlist widget). At this point, the navigation breaks when the currently container has an <ondown> that points to the id of a hidden container. I tried adding allowhiddenfocus="true" but then that means you need multiple button presses between displaying items.

Is there a way to automate this process so the grouplist figures out which controls will be visible/hidden aaand then just scroll through the visible ones when up or down are pressed?
Found the solution in this threat: 350459 (thread)

Having groups in a grouplist breaks its ability to navigate automatically so if you want the grouplist to automatically navigate to without conditional <onup>s and <ondown>s in each list, you need to make sure that the items are as 'flat' as possible. So take the individual controls out of the group, give each one an ID, and then the grouplist will automatically navigate to the next/previous visible container that can be focused (it will skip over labels etc).