Fixed List Container: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
>Garebear
m (grammar)
>NedBot
m (Wikitable class)
Line 94: Line 94:
=== Available Tags ===
=== Available Tags ===
In addition to the [[Default Control Tags]] the following tags are available. Note that each tag is '''lower case''' only. This is important, as xml tags are case-sensitive.
In addition to the [[Default Control Tags]] the following tags are available. Note that each tag is '''lower case''' only. This is important, as xml tags are case-sensitive.
{| class="dtable"
{| class="wikitable"
|- class="userrow"
|-  
| class="usercell" | '''viewtype'''
| '''viewtype'''
| class="usercell" | The type of view. Choices are list, icon, wide, wrap, biglist, bigicon, bigwide, bigwrap, info and biginfo. The label attribute indicates the label that will be used in the "View As" control within the GUI. It is localizable via strings.xml.
| The type of view. Choices are list, icon, wide, wrap, biglist, bigicon, bigwide, bigwrap, info and biginfo. The label attribute indicates the label that will be used in the "View As" control within the GUI. It is localizable via strings.xml.
|- class="userrow"
|-  
| class="usercell" | '''orientation'''
| '''orientation'''
| class="usercell" | The orientation of the list. Defaults to vertical.
| The orientation of the list. Defaults to vertical.
|- class="userrow"
|-  
| class="usercell" | '''pagecontrol'''
| '''pagecontrol'''
| class="usercell" | Used to set the <id> of the page control used to control this list.
| Used to set the <id> of the page control used to control this list.
|- class="userrow"
|-  
| class="usercell" | '''scrolltime'''
| '''scrolltime'''
| class="usercell" | The time (in ms) to scroll from one item to another.  By default, this is 200ms.  The list will scroll smoothly from one item to another as needed. Set it to zero to disable the smooth scrolling. The scroll movement can be further adjusted by selecting one of the available [[Tweeners|tween]] methods.
| The time (in ms) to scroll from one item to another.  By default, this is 200ms.  The list will scroll smoothly from one item to another as needed. Set it to zero to disable the smooth scrolling. The scroll movement can be further adjusted by selecting one of the available [[Tweeners|tween]] methods.
|- class="userrow"
|-  
| class="usercell" | '''focusposition'''
| '''focusposition'''
| class="usercell" | Specifies the focus position (from 0 -> number of displayable items - 1).  The focused position doesn't change - instead, the items move up or down (or left and right) as focus changes.
| Specifies the focus position (from 0 -> number of displayable items - 1).  The focused position doesn't change - instead, the items move up or down (or left and right) as focus changes.
|- class="userrow"
|-  
| class="usercell" | '''itemlayout'''
| '''itemlayout'''
| class="usercell" | Specifies the layout of items in the list. Requires the height attribute set in a vertical list, and the width attribute set for a horizontal list. The <itemlayout> then contains as many label and image controls as required. [[Container Item Layout|See here for more information.]]
| Specifies the layout of items in the list. Requires the height attribute set in a vertical list, and the width attribute set for a horizontal list. The <itemlayout> then contains as many label and image controls as required. [[Container Item Layout|See here for more information.]]
|- class="userrow"
|-  
| class="usercell" | '''focusedlayout'''
| '''focusedlayout'''
| class="usercell" | Specifies the layout of items in the list that have focus. Requires the height attribute set in a vertical list, and the width attribute set for a horizontal list. The <focusedlayout> then contains as many label and image controls as required. [[Container Item Layout|See here for more information.]]
| Specifies the layout of items in the list that have focus. Requires the height attribute set in a vertical list, and the width attribute set for a horizontal list. The <focusedlayout> then contains as many label and image controls as required. [[Container Item Layout|See here for more information.]]
|- class="userrow"
|-  
| class="usercell" | '''content'''
| '''content'''
| class="usercell" | Used to set the item content that this list will contain. Allows the skinner to setup a list anywhere they want with a static set of content, as a useful alternative to the grouplist control. [[Static List Content|See here for more information]]
| Used to set the item content that this list will contain. Allows the skinner to setup a list anywhere they want with a static set of content, as a useful alternative to the grouplist control. [[Static List Content|See here for more information]]
|- class="userrow"
|-  
| class="usercell" | '''preloaditems'''
| '''preloaditems'''
| class="usercell" | Used in association with the background image loader. [[Background Image Loader|See here for more information]]
| Used in association with the background image loader. [[Background Image Loader|See here for more information]]
|}
|}


[[Category:Skin Development]]
[[Category:Skin Development]]

Revision as of 07:50, 26 November 2011

The fixed list container is one of several containers used to display items from file lists in various ways. The fixed list container is the same as the List Container, with one exception: the focused item is fixed. Thus, moving up or down scrolls the items, not the focused position. As with all container controls, the layout of the items within the control is very flexible.

    <control type="fixedlist" id="50">
          <description>My first fixed list container</description>
          <posx>80</posx>
          <posy>60</posy>
          <width>250</width>
          <height>200</height>
          <visible>true</visible>
          <onup>2</onup>
          <ondown>3</ondown>
          <onleft>1</onleft>
          <onright>1</onright>
          <viewtype label="3D list">list</viewtype>
          <orientation>vertical</orientation>
          <pagecontrol>25</pagecontrol>
          <scrolltime tween="sine" easing="out">200</scrolltime>
          <focusposition>4</focusposition>
          <itemlayout width="250" height="29">
                    <control type="image">
                            <posx>5</posx>
                            <posy>3</posy>
                            <width>22</width>
                            <height>22</height>
                            <info>ListItem.Icon</info>
                    </control>
                    <control type="label">
                            <posx>30</posx>
                            <posy>3</posy>
                            <width>430</width>
                            <height>22</height>
                            <font>font13</font>
                            <aligny>center</aligny>
                            <selectedcolor>green</selectedcolor>
                            <align>left</align>
                            <info>ListItem.Label</info>
                    </control>
                    <control type="label">
                            <posx>475</posx>
                            <posy>3</posy>
                            <width>300</width>
                            <height>22</height>
                            <font>font13</font>
                            <aligny>center</aligny>
                            <selectedcolor>green</selectedcolor>
                            <textcolor>grey</textcolor>
                            <align>right</align>
                            <info>ListItem.Label2</info>
                    </control>
          </itemlayout>
          <focusedlayout height="29" width="250">
                    <control type="image">
                            <width>485</width>
                            <height>29</height>
                            <posx>0</posx>
                            <posy>0</posy>
                            <visible>Control.HasFocus(50)</visible>
                            <texture>list-focus.png</texture>
                    </control>
                    <control type="image">
                            <posx>5</posx>
                            <posy>3</posy>
                            <width>22</width>
                            <height>22</height>
                            <info>ListItem.Icon</info>
                    </control>
                    <control type="label">
                            <posx>30</posx>
                            <posy>3</posy>
                            <width>430</width>
                            <height>22</height>
                            <font>font13</font>
                            <aligny>center</aligny>
                            <selectedcolor>green</selectedcolor>
                            <align>left</align>
                            <info>ListItem.Label</info>
                    </control>
                    <control type="label">
                            <posx>475</posx>
                            <posy>3</posy>
                            <width>300</width>
                            <height>22</height>
                            <font>font13</font>
                            <aligny>center</aligny>
                            <selectedcolor>green</selectedcolor>
                            <textcolor>grey</textcolor>
                            <align>right</align>
                            <info>ListItem.Label2</info>
                    </control>
          </focusedlayout>
    </control>

Available Tags

In addition to the Default Control Tags the following tags are available. Note that each tag is lower case only. This is important, as xml tags are case-sensitive.

viewtype The type of view. Choices are list, icon, wide, wrap, biglist, bigicon, bigwide, bigwrap, info and biginfo. The label attribute indicates the label that will be used in the "View As" control within the GUI. It is localizable via strings.xml.
orientation The orientation of the list. Defaults to vertical.
pagecontrol Used to set the <id> of the page control used to control this list.
scrolltime The time (in ms) to scroll from one item to another. By default, this is 200ms. The list will scroll smoothly from one item to another as needed. Set it to zero to disable the smooth scrolling. The scroll movement can be further adjusted by selecting one of the available tween methods.
focusposition Specifies the focus position (from 0 -> number of displayable items - 1). The focused position doesn't change - instead, the items move up or down (or left and right) as focus changes.
itemlayout Specifies the layout of items in the list. Requires the height attribute set in a vertical list, and the width attribute set for a horizontal list. The <itemlayout> then contains as many label and image controls as required. See here for more information.
focusedlayout Specifies the layout of items in the list that have focus. Requires the height attribute set in a vertical list, and the width attribute set for a horizontal list. The <focusedlayout> then contains as many label and image controls as required. See here for more information.
content Used to set the item content that this list will contain. Allows the skinner to setup a list anywhere they want with a static set of content, as a useful alternative to the grouplist control. See here for more information
preloaditems Used in association with the background image loader. See here for more information