xml control list descriptions / use cases / examples
#1
Where to see examples of each control?

The list of controls for the xml files on this site is great: Controls (wiki). But I was wondering if there is anywhere I can see some examples of use-cases for them? Specifically the differences between the containers. Or even just better descriptions. Currently I'm looking at the Panel Container or Fixed List Container. But I have looked at the controls on this list before and left with more questions than answers. My inexperience may be showing, but your help is appreciated.

I'm also having difficulty understanding the <itemlayout> and <focusedlayout> and how they are different?
Reply
#2
This is a panel -

Image

This is a list -

Image

Focused layout is how you want the item that is focused to look and the rest are the item layout.
Reply
#3
great thanks. Can buttons be placed in a panel? The only one i could get to work is group list control. Panel and Wraplist both ended up with an empty screen and an error in the log "unsupported control added type 7" or something like that. I ended up using group list and it's working perfectly. I guess i just wanted to understand the options better. Thanks for the help.
Reply
#4
My view (may not be 100% correct):

The "group" type controls are intended to assist skinners in placing other controls.  The "container" controls are intended to manage abstract entities called listitems.  In general listitems are media with a path to the item for playing or a link to a sub-folder of listitems, and with various "properties" attached to the item.  There is default "onclick" behavior for media listitems in the media windows.

The <content> tag allows skinners to define what might be termed "pseudo listitems" where the skinner specifies the action taken for the "onclick" as well as the properties.  These content items can work like a button control.

Containers in media windows can have visibility controlled via the <views> element and "view controls".

Containers have some limitations as regards availability to use the listitem properties outside of the container.

scott s.
.
Reply
#5
(2023-07-21, 18:50)mjc_cox Wrote: great thanks. Can buttons be placed in a panel? The only one i could get to work is group list control. Panel and Wraplist both ended up with an empty screen and an error in the log "unsupported control added type 7" or something like that. I ended up using group list and it's working perfectly. I guess i just wanted to understand the options better. Thanks for the help.

If you're adding your own content/controls then you'll need to use a static list -

https://kodi.wiki/index.php?title=Static_List_Content
Reply
#6
hmm i did use the group list for one page in my addon that the buttons are not made dynamically. It was pretty handy actually just set orientation to horizontal add the buttons and the gap and they just work. Much like the home screen of aeon mq skins. It worked but i was hoping to expand my use but wanted to learn more about the controls first. Seems like super confusing. I certainly couldn't get panel or wraplist to work. All of the buttons just disappear.
Reply
#7
You have to use items and then fill the content with the labels and actions you want.

xml:
<content>
<item id="1">
<label>My First Item</label>
<label2>Label 2</label2>
<icon>icon1.png</icon>
<thumb>thumb1.png</thumb>
<onclick>ActivateWindow(Videos)</onclick>
<visible>true</visible>
<property name="foo">Some1stValueHere</property>
<property name="foo2">Some2ndValueHere</property>
</item>
<item id="2">
<label>My Second Item</label>
<label2>Label 2</label2>
<icon>icon2.png</icon>
<thumb>thumb2.png</thumb>
<onclick>ActivateWindow(Music)</onclick>
<property name="foo">Some1stValueHere</property>
<property name="foo2">Some2ndValueHere</property>
</item>
</content>

So in this example you could change the onclick values to whatever action you want.

Here's an example in Confluence to open the various setting windows.

https://github.com/xbmc/skin.confluence/...s.xml#L117
Reply

Logout Mark Read Team Forum Stats Members Help
xml control list descriptions / use cases / examples0