Kodi ——6 Controls (24)6.24 Wraplist Container

来源:互联网 发布:淘宝美工风格 编辑:程序博客网 时间:2024/06/08 09:06

6.24 Wraplist Container

     wrap list容器用于显示文件列表中的项目,可以以各种方式显示,它是众多容器之一wrap list容器是和列表容器相同,有两个例外:

    1.聚焦项目是固定的。
    2.该项目“包装”周围,一旦他们到达终点。

与所有容器的控制,在控制范围内的项目的布局非常灵活

6.24.1 Example

<control type="wraplist" id="50">      <description>My first wraplist container</description>      <left>80</left>      <top>60</top>      <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>      <focusposition>3</focusposition>      <scrolltime tween="sine" easing="out">200</scrolltime>      <autoscroll>true</autoscroll>      <itemlayout width="250" height="29">                <control type="image">                        <left>5</left>                        <top>3</top>                        <width>22</width>                        <height>22</height>                        <info>ListItem.Icon</info>                </control>                <control type="label">                        <left>30</left>                        <top>3</top>                        <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">                        <left>475</left>                        <top>3</top>                        <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>                        <left>0</left>                        <top>0</top>                        <visible>Control.HasFocus(50)</visible>                        <texture>list-focus.png</texture>                </control>                <control type="image">                        <left>5</left>                        <top>3</top>                        <width>22</width>                        <height>22</height>                        <info>ListItem.Icon</info>                </control>                <control type="label">                        <left>30</left>                        <top>3</top>                        <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">                        <left>475</left>                        <top>3</top>                        <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>

6.24.2 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.

TagDescriptionviewtypeThe 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.viewtype has no effect on the view itself. It is used by kodi when switching skin to automatically select a view with a similar layout. Skinners should try to setviewtype to describe the layout as best as possible.orientationThe orientation of the list. Defaults to vertical.pagecontrolUsed to set the <id> of the page control used to control this list.scrolltimeThe 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.focuspositionSpecifies the index (from 0 -> number items displayable - 1) of the focused item. The focused item doesn't move - as the user moves up and down (or left and right) the items scroll instead.itemlayoutSpecifies 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.focusedlayoutSpecifies 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.contentUsed 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 informationautoscrollUsed to make the container scroll automatically
0 0
原创粉丝点击