How can I add a new view mode?

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
igotdvds Offline
Skilled Skinner
Posts: 1,616
Joined: Jul 2009
Reputation: 11
Question  How can I add a new view mode? Post: #1
People have told me this but I cant quite get it.

I want to make a brand new view and add it to the list of options. I made the view, how do I add it?
find quote
mcborzu Offline
Skilled Skinner
Posts: 3,381
Joined: Feb 2009
Reputation: 15
Location: dsf
Post: #2
You should just have to give the view a unique id and add that to <views> at myvideonav.xml...
<control type="wraplist" id="720">
<views>50,500,501,508,504,503,505,511,720</views>

If you want to go a little further, I prefer the Alaska/Aeon way of keeping things inside of different viewtype_foo.xml instead of all in one big view.xml. Plus when Confluence is updated it wont be overwritten and you wont have to compare and merge.

Anyways here is an example taking PosterWrap and making into a new view called bob, with include name of YoMomma. You can see it here...http://pastebin.com/m6c9e4b26

Then added the view id of 720 to the <views> tag at the top of myvideonav.xml.

Then added this bolded part at line 152 in myvideonav.xml
Quote:<include>WideIconView</include> <!-- view id = 505 -->
<include>MusicVideoInfoListView</include> <!-- view id = 511 -->
<include>YoMomma</include>

And then this <include file="viewtype_test.xml" /> at the top of includes.xml
(This post was last modified: 2010-01-29 03:21 by mcborzu.)
find quote
Jezz_X Offline
Team-XBMC Skinner
Posts: 5,264
Joined: Jun 2006
Reputation: 55
Location: Earth
Post: #3
Look into the file you want to add it to in this example MyVideo.xml (video files mode)
add your code or include depending on how you did it too this block
PHP Code:
        <control type="group">
            <include>
Window_OpenClose_Animation</include>        
            <include>
CommonRootView</include> <!-- view id 50 -->
            <include>
FullWidthList</include> <!-- view id 51 -->
            <include>
ThumbnailView</include> <!-- view id 500 -->
            <include>
PosterWrapView</include> <!-- view id 501 -->
            <include>
PosterWrapView2_Fanart</include> <!-- view id 508 -->
            <include>
WideIconView</include> <!-- view id 505 -->
        </
control

and make sure you also add the id number of the view to this line at the top
PHP Code:
    <views>50,51,500,501,508,505</views

You of course need to make sure that the id number doesn't conflict with any of the current ones

Skins I have done....
[Image: skinsq.png]
And others in the past...

Want to know what I'm working on currently? Check me out on Google+
find quote
ronie Offline
Team-XBMC Member
Posts: 8,259
Joined: Jan 2009
Reputation: 108
Post: #4
Jezz_X Wrote:and make sure you also add the id number of the view to this line at the top
PHP Code:
    <views>50,51,500,501,508,505</views

i've been wondering for some time why this is needed?
some skins don't use a <views> definition at the top of their My*.xml files,
while others don't seem to run properly without it.

could you explain what that line means?

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not PM or e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
igotdvds Offline
Skilled Skinner
Posts: 1,616
Joined: Jul 2009
Reputation: 11
Post: #5
Thanks for the help guys!
find quote
Jezz_X Offline
Team-XBMC Skinner
Posts: 5,264
Joined: Jun 2006
Reputation: 55
Location: Earth
Post: #6
ronie Wrote:i've been wondering for some time why this is needed?
some skins don't use a <views> definition at the top of their My*.xml files,
while others don't seem to run properly without it.

could you explain what that line means?

the <views> tag lets you use id's beyond 50 to 59 it also lets you set the order in which they cycle with the change view button in the skin by changing the order of the numbers in the tag

You don't need the <views> tag if your only using id's 50 to 59 for views but as you can see in confluence aside from id 50 (needed for virtual nav to lists not id'd 50) I use 500 - 600

Skins I have done....
[Image: skinsq.png]
And others in the past...

Want to know what I'm working on currently? Check me out on Google+
find quote
ronie Offline
Team-XBMC Member
Posts: 8,259
Joined: Jan 2009
Reputation: 108
Post: #7
thanx, o thou skinning master!

i'll check if there's a suitable place in the wiki for this info.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not PM or e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote