Quantcast
Channel: Kodi Community Forum - Skinning
Viewing all articles
Browse latest Browse all 1803

Animation Fade Out After Delay

$
0
0
Two questions for my Home.xml:
  1. I am looking to have one label appear when the home screen is first presented, then fade out after a delay. Then have a second label fade in where the first label was.
  2. Only have that first label show when Kodi is first opened. The second label should be shown any time Home.xml is presented.
Here is my code:
xml:
            <control type="label">
                <description>Kodi label</description>
                <right>130</right>
                <top>45</top>
                <width>300</width>
                <height>15</height>
                <align>right</align>
                <aligny>center</aligny>
                <font>font30_light</font>
                <textcolor>white</textcolor>
                <label>Kodi Media Center</label>
                <animation effect="fade" start="100" end="0" time="500" delay="5000">WindowOpen</animation>
                <animation effect="fade" time="200">WindowClose</animation>
                <visible>true</visible>
            </control>
            <control type="label">
                <description>Time label</description>
                <right>130</right>
                <top>45</top>
                <width>300</width>
                <height>15</height>
                <align>right</align>
                <aligny>center</aligny>
                <font>font30_light</font>
                <textcolor>white</textcolor>
                <label>$INFO[System.Time]</label>
                <animation effect="fade" delay="5000" start="0" end="100" time="500">WindowOpen</animation>
                <animation effect="fade" time="200">WindowClose</animation>
                <visible>true</visible>
            </control>

The "Time label" (2nd label) fades in as expected but the "Kodi label" (1st label) is the problem. It is not visible until the delay="5000" is done. Nothing is there at the start, then it appears after the 5000ms and then fades out over the 500ms. How do I get it to be visible when the Window opens and fade out after the 5000ms?

Also, after Kodi is opened and the above animation is complete, how do I get the "Time label" to always be visible and the "Kodi label" to not show? Right now it happens every time I go back to Home.xml. If I go into a library, and go back to the home screen, the animation happens again and I only want it to happen once after Kodi is opened.

Viewing all articles
Browse latest Browse all 1803

Trending Articles