Empty sking with a simple label is blank.
#1
Hello Everyone,

I am trying to create the simplest skin possible from scratch but am having some trouble. Below is the contents of my Home.xml which should display a label somewhere on the screen, however when I launch Kodi all I get is an empty blank screen. Can someone tell me what I am doing wrong or provide me with a way to debug the problem?

Thanks

http://ix.io/1BMl
Reply
#2
kodi requires a number of xml files to be present in your skin (not just home.xml)
without those files, it will not start properly. perhaps that is your issue?

you can check your Debug Log which of the required files are missing.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
Edit: I discovered that my problem was a missing Fonts.xml file (by inspecting kodi.log), however I have another problem. While the label now displays correctly I can't seem to display a list of items, here is a modification with a list control copied directly from the wiki. While the label shows, the list does not. There are no errors in kodi.xml

http://ix.io/1BMw
Reply
#4
the list is empty because you have not defined any items.
kodi can't read your mind, it has no idea what you want to display in that list ;-)

lists in the library windows will be auto filled by kodi, but on the home screen it's up to you to define which items to show.

https://kodi.wiki/view/Skinning_Manual#F...ic_content
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#5
(2019-02-22, 22:24)ronie Wrote: kodi can't read your mind
 This seems like a grave oversight :/. When will this feature be implemented!?

But seriously, I think I have misunderstood something.


The list control has a few labels in it, don't those count as content? My understanding is that the section below should put a label in the list, but I don't see anything. I apologize for these dumb questions, I am a developer and have written things from webapps to window managers but I can't for the life of me figure out how to produce a simple list in kodi :/.
Quote:                <control type="label">
                    <left>475</left>
                    <top>3</top>
                    <width>300</width>
                    <height>22</height>
                    <font>font13</font>
                    <aligny>center</aligny>
                    <selectedcolor>green</selectedcolor>
                    <textcolor>grey</textcolor>
                    <label>test two</label>
                    <align>right</align>
                    <info>ListItem.Label2</info>
                </control>
Reply
#6
nope, the label controls inside the <itemlayout> and <focusedlayout> serve as a template.
ie. they define the width / height / textcolor etc.. of all the items in the list.

the structure of a container with static items is basically like this:

xml:
        <control type="list" id="50">
            ...

            <itemlayout width="250" height="29">
                <control type="label">
                    ...
                    <label>$INFO[ListItem.Label]</label>
                </control>
            </itemlayout>

            <focusedlayout height="29" width="250">
                <control type="label">
                    ...
                    <label>$INFO[ListItem.Label]</label>
                </control>
            </focusedlayout>

            <content>
                <item id="1">
                    <label>Music</label>
                    ...
                </item>
                <item id="2">
                    <label>Videos</label>
                    ...
                </item>
            </content>

        </control>
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#7
Ah, I think I understand. So the layout attributes specify the laytout in the form of controls and the info tag contains placeholders for the actual list items (like ListItem.Label2)? I have tried your example but I still don't see anything, here is the file:

http://ix.io/1BMS
Reply
#8
(2019-02-22, 22:31)marcus1901 Wrote:
(2019-02-22, 22:24)ronie Wrote: kodi can't read your mind
 This seems like a grave oversight :/. When will this feature be implemented!?

But seriously, I think I have misunderstood something.


The list control has a few labels in it, don't those count as content? My understanding is that the section below should put a label in the list, but I don't see anything. I apologize for these dumb questions, I am a developer and have written things from webapps to window managers but I can't for the life of me figure out how to produce a simple list in kodi :/.
Quote:                <control type="label">
                    <left>475</left>
                    <top>3</top>
                    <width>300</width>
                    <height>22</height>
                    <font>font13</font>
                    <aligny>center</aligny>
                    <selectedcolor>green</selectedcolor>
                    <textcolor>grey</textcolor>
                    <label>test two</label>
                    <align>right</align>
                    <info>ListItem.Label2</info>
                </control>
The list controls works as follows: (I have ommited several necessary tags, like "width" and "height".  But the principal should be clear

xml:

<!-- This defines you want a list-->
<control type="list">

      <!-- This defines a template that is to be used to displayed items in a list that are not currenlty focused -->
      <itemlayout>
            <!-- Template defining that all items of the list which are currently not focused should display their label with the color Blue-->
           <control type="label" >
                   <label>$INFO[ListItem.Label]</label>
                    <textcolor>FF0000FF</textcolor>
            </control>
      </itemlayout>
      <!-- this defines a template that is to be used to display the item of the list that is currently focused -->
      <focusedlayout>
             <!-- Template defining that the item currently focused in the list should display its label with the color Red-->
            <control type="label" >
                   <label>$INFO[ListItem.Label]</label>
                   <textcolor>FFFF0000</textcolor>
            </control>
      </focusedlayout>
      <!-- This defines the actual content that should be displayed in the list, the content here defined will make use of the above defined templates, as Ronie said the whole content tag is not necessary when the content is provided by Kodi, e.g. when navigatinng your movies, but in the case of Home.xml their is nothing Kodi can populate automatically-->
      <content>
                <!-- this defines one of the actual items of the list  -->
                <item id="1!>
                         <label>I am the first item on the list</label>
                 </item>
                   <!-- this defines another of the actual items of the list -->
                 <item id="2">
                           <label>I am the second item on the list</label>
                  </item>
     </content>


</control>


A  Result you should see: (when the second item is focused:

I am the first item on the list
I am the second item on the list
Reply
#9
(2019-02-22, 22:57)marcus1901 Wrote: Ah, I think I understand. So the layout attributes specify the laytout in the form of controls and the info tag contains placeholders for the actual list items (like ListItem.Label2)? I have tried your example but I still don't see anything, here is the file:

http://ix.io/1BMS
 You are missing width and hight tags for your label controls.
Reply
#10
Brilliant! I think I am starting to grok it now. I wish there was something this detailed on the wiki, your comments really helped me get a better idea of how things work. Normally I would start with some existing code and then strip things out binary search style until I had something which minimally worked but most of the skins seem to contain a nest of never ending includes which are hard to navigate and impede understanding the basic XML skin structure.  Thanks for your help!
Reply

Logout Mark Read Team Forum Stats Members Help
Empty sking with a simple label is blank.0