Kodi Community Forum

Full Version: More Than One List View
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Tring to put together a VIEWTYPE for a skin I'm messing with. I currently have a list with a certain ID number, and another list with the same ID number which inherirates the others appearance and adds to it...

Now I', trying to create another LIST VIEW which doesn't use any of the attributes of the above lists. So I created the xml code for this list, gave it another ID number and tried to include it, but it doesn't show up... If I give it the same ID as the other two lists, it just adds to the other two lists...

How do I create a new LIST which is completely different to the two above viewsHuh
I don't know about anyone else who has read this, but I have absolutely no idea what you are talking about.
yeah I'm drawing a blank too
I just can't manage to create two List (VIEWTYPE="list") views for a section... PM3 skin has List1 and List2, and I can't manage to create two lists for the same section without one inheriting the other's elements... make any sense now guys?
You can't give them the same id number.
xb2iris Wrote:gave it another ID number and tried to include it

He already addressed that. Wink
K, let me chime in here. I *think* I might know what is going on. For starters, Cheif is right that if you give views the same ID number you run the risk of them as you described it "inheriting" each others properties or a picture placed in a specific spot in one view showing up in the second view. The easy way to get around this is to use conditionals and only use that viewtype number once per section. So for example your "listview" can look completely different for each section because each control has a conditional visibility set up so it only shows up in the proper section ie episodes, movies, tvshows, pictures. Here is an example:
Code:
<control type="image">
            <posx>866</posx>
            <posy>188</posy>
            <width>402</width>
              <height>289</height>
            <texture>episodeframe.png</texture>
                  <visible>Container.Content(episodes)</visible>
</control>

So this image only shows up if I am looking at episodes. Below it in the same viewtype include are image controls for all the other content types. So this include for listview would have a different layout for each section. You could also accomplish the same thing by having several different includes all with the same id but still using the conditionals to make sure they don't overlap. That way you could name each view differently for each section. In some cases it is easier to have one large viewtype, like in the case of "list" which most views will use. If you want a "custom" name for each view type, like "episode info," "movie wall," etc it is easier to use separate conditional includes and recycling ID numbers.

Now, if you want another viewtype called list2 and you want list1 and list2 to both be usable in say movies, the easiest thing to do is give them a different ID, I know you said you tried that but did you make sure it falls in the allowed number scheme? I think it is 50-59 and no greater/less. That is really the only thing I can think of as to why your new view is not showing (without actually seeing the code of course). I made the same mistake early on, giving a viewtype an id of like 90 trying to keep them from overlapping. Hope this helps. Cheers.
Rando... thats an amazing explaination... it sure will help... conditionals are pretty cool... gonna try to get some lists up and running in the same section as well... and then i'm check what happens elsewise... see guys, thats how u answer a question...

Thanks Rand... thats sure gonna help a lot!

Rand Al Thor Wrote:K, let me chime in here. I *think* I might know what is going on. For starters, Cheif is right that if you give views the same ID number you run the risk of them as you described it "inheriting" each others properties or a picture placed in a specific spot in one view showing up in the second view. The easy way to get around this is to use conditionals and only use that viewtype number once per section. So for example your "listview" can look completely different for each section because each control has a conditional visibility set up so it only shows up in the proper section ie episodes, movies, tvshows, pictures. Here is an example:
Code:
<control type="image">
            <posx>866</posx>
            <posy>188</posy>
            <width>402</width>
              <height>289</height>
            <texture>episodeframe.png</texture>
                  <visible>Container.Content(episodes)</visible>
</control>

So this image only shows up if I am looking at episodes. Below it in the same viewtype include are image controls for all the other content types. So this include for listview would have a different layout for each section. You could also accomplish the same thing by having several different includes all with the same id but still using the conditionals to make sure they don't overlap. That way you could name each view differently for each section. In some cases it is easier to have one large viewtype, like in the case of "list" which most views will use. If you want a "custom" name for each view type, like "episode info," "movie wall," etc it is easier to use separate conditional includes and recycling ID numbers.

Now, if you want another viewtype called list2 and you want list1 and list2 to both be usable in say movies, the easiest thing to do is give them a different ID, I know you said you tried that but did you make sure it falls in the allowed number scheme? I think it is 50-59 and no greater/less. That is really the only thing I can think of as to why your new view is not showing (without actually seeing the code of course). I made the same mistake early on, giving a viewtype an id of like 90 trying to keep them from overlapping. Hope this helps. Cheers.
xb2iris Wrote:see guys, thats how u answer a question...

Your answer may have came faster and better if we weren't left to guess what you were talking about. Some code snippets would have helped along with a better description as to what the problem was. I'm sorry that I was no help, but I am not gonna give a detailed answer to a question I am guessing you are asking.