Kodi Community Forum
add space between first item and second item of a list container - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12)
+--- Thread: add space between first item and second item of a list container (/showthread.php?tid=379346)

Pages: 1 2


add space between first item and second item of a list container - ranjibart - 2024-11-03

Guys, I have this list. I would like to add space between the first item and the rest of the list.

Right now it's like this: - - - - (1 2 3 4 5 ...)

I want: -       - - - - - - (1       2 3 4 5 ...)

AND: I don't want the focused item to move to the place of the first item. Hence a list instead of a fixedlist.

Is that possible?

xml:
    <control type="list" id="52">
        <left>594</left>
        <top>-200</top>
        <orientation>vertical</orientation>
        <pagecontrol>531</pagecontrol>
        <movement>11</movement>
        <focusposition>10</focusposition>
        <focusedlayout height="75">
            <control type="image">
                <left>0</left>
                <right>0</right>
                <texture colordiffuse="button_focus">lists/focus.png</texture>
                <visible>Control.HasFocus(52)</visible>
            </control>
            <control type="image">
                <left>35</left>
                <centertop>50%</centertop>
                <width>32</width>
                <height>32</height>
                <texture>$VAR[ListWatchedIconVar]</texture>
            </control>
            <control type="label">
                <left>105</left>
                <top>0</top>
                <bottom>0</bottom>
                <right>40</right>
                <aligny>center</aligny>
                <scroll>true</scroll>
                <label>$VAR[ListLabelVar]</label>
                <shadowcolor>text_shadow</shadowcolor>
            </control>
        </focusedlayout>
        <itemlayout height="75">
            <control type="image">
                <left>35</left>
                <centertop>50%</centertop>
                <width>32</width>
                <height>32</height>
                <texture colordiffuse="grey">$VAR[ListWatchedIconVar]</texture>
            </control>
            <control type="label">
                <left>105</left>
                <top>0</top>
                <bottom>0</bottom>
                <right>40</right>
                <aligny>center</aligny>
                <label>$VAR[ListLabelVar]</label>
                <shadowcolor>text_shadow</shadowcolor>
            </control>
        </itemlayout>
    </control>




RE: add space between first item and second item of a list container - Hitcher - 2024-11-03

Wont that look odd when you select items 2, 3, 4, etc?

(1       2 3 4 5 ...)
(1       2 3 4 5 ...)
(1       2 3 4 5 ...)
(1       2 3 4 5 ...)
(1       2 3 4 5 ...)


RE: add space between first item and second item of a list container - ranjibart - 2024-11-04

hi, that depiction looks correct.
 
(2024-11-03, 23:56)Hitcher Wrote: Wont that look odd when you select items 2, 3, 4, etc?

(1       2 3 4 5 ...)
(1       2 3 4 5 ...)
(1       2 3 4 5 ...)
(1       2 3 4 5 ...)
(1       2 3 4 5 ...)

No, because it's just the same as a classic list. Only with space between the first item and the rest. Is it possible? I tried and failed so far.


RE: add space between first item and second item of a list container - Hitcher - 2024-11-04

(2024-11-04, 00:05)ranjibart Wrote: Is it possible?
No, not with using a standard list.


RE: add space between first item and second item of a list container - ranjibart - 2024-11-04

(2024-11-04, 00:10)Hitcher Wrote:
(2024-11-04, 00:05)ranjibart Wrote: Is it possible?
No, not with using a standard list.
any alternative or solution? A hack maybe?


RE: add space between first item and second item of a list container - Hitcher - 2024-11-04

Only way would be to use a fixed list but you don't want that.


RE: add space between first item and second item of a list container - ranjibart - 2024-11-04

(2024-11-04, 00:23)Hitcher Wrote: Only way would be to use a fixed list but you don't want that.

Yeah, that's kinda the thing. I need the first item fixed. It shouldn't move.

Thanks anways. I appreciate your time!


RE: add space between first item and second item of a list container - Hitcher - 2024-11-04

Is your list stationary or animated? If it's stationary you could fake the first item.


RE: add space between first item and second item of a list container - ranjibart - 2024-11-04

(2024-11-04, 02:28)Hitcher Wrote: Is your list stationary or animated? If it's stationary you could fake the first item.

a plain list, no animation, how can I fake it?

Thanks!!


RE: add space between first item and second item of a list container - realcopacetic - 2024-11-05

out of interest, why don't you want the separated item to be the focused item? I would think from a UX perspective it would be where people look first for differentiation between a list item and a focused list item. Also if you're scrolling through more items your list would sort of end up as a fixed list anyway. Like in the example Hitcher showed, any subsequent scroll forward would be in position 5 so your first item would be position -4 most of the time. On scrolling previous it would be focused item most of the time unless you're changing the <movement> property


RE: add space between first item and second item of a list container - Hitcher - 2024-11-05

(2024-11-04, 03:32)ranjibart Wrote: how can I fake it?
With a hidden list, separate images, and lots of variables based on current focused item and position to display them.


RE: add space between first item and second item of a list container - ranjibart - 2024-11-06

(2024-11-05, 16:32)Hitcher Wrote:
(2024-11-04, 03:32)ranjibart Wrote: how can I fake it?
With a hidden list, separate images, and lots of variables based on current focused item and position to display them.

alright, thank you!


RE: add space between first item and second item of a list container - ranjibart - 2024-11-06

(2024-11-05, 15:10)realcopacetic Wrote: out of interest, why don't you want the separated item to be the focused item? I would think from a UX perspective it would be where people look first for differentiation between a list item and a focused list item. Also if you're scrolling through more items your list would sort of end up as a fixed list anyway. Like in the example Hitcher showed, any subsequent scroll forward would be in position 5 so your first item would be position -4 most of the time. On scrolling previous it would be focused item most of the time unless you're changing the <movement> property

I'll try to explain more. Think of the Estuary skin where you have "recently added movies" in home.xml and you keep moving to the right. The only difference is I want the second item, third item, fourth item etc... to appear after some space so I can place a static image. Ideally all other items of the list would appear in a second row. That's basically it. Looks like it's not even easy to fake...


RE: add space between first item and second item of a list container - Hitcher - 2024-11-06

Can you post a mock up because I don't really understand exactly what you want?


RE: add space between first item and second item of a list container - ranjibart - 2024-11-06

(2024-11-06, 01:48)Hitcher Wrote: Can you post a mock up because I don't really understand exactly what you want?
I did some photoshop and tried to make it as obvious as possible. I uploaded 3 pics.

starting point: Image

ideally to this (multi-row solution): Image

alternatively (single-row solution): Image