Solved How can a window change be animated
#1
Hi,

i have a little problem.
I want an animation when i switch from home window to another. I tried it with
Code:
<animation effect="slide" end="-800,0" time="600">WindowClose</animation>
but the window switched instant and without animation.
I googled several hours and didn't find a solution. I testet the animation with Focus instead of WindowClose and there it worked.
How do i display the animation before the home window changes to another window?

greets,
chris
Reply
#2
Works OK for me.
Where exactly did you put the animation?
Reply
#3
here is my complete home.xml
the animation is at focusedlayout

Code:
<?xml version="1.0" encoding="UTF-8"?>
<window id="0">
  <defaultcontrol always="true">100</defaultcontrol>
  <allowoverlay>yes</allowoverlay>

  <controls>
    <include>GlobalBackground</include>
    <include>BottomBar</include>


    <control type="fixedlist" id="100">
      <description>Home Fixedlist</description>
      <orientation>horizontal</orientation>
      <posx>-240</posx>
      <posy>984</posy>
      <width>2160</width>
      <height>96</height>
      <onup>100</onup>
      <ondown>100</ondown>
      <onleft>100</onleft>
      <onright>100</onright>
      <focusposition>3</focusposition>
      <scrolltime>200</scrolltime>


      <itemlayout width="400" height="96">
        <control type="label">
          <info>ListItem.Label</info>
          <font>Home</font>
          <textcolor>Unselected</textcolor>
          <align>center</align>
          <aligny>center</aligny>
          <height>96</height>
        </control>
      </itemlayout>

      <focusedlayout width="400" height="96">
        <control type="label">
          <info>ListItem.Label</info>
          <font>Home</font>
          <textcolor>Selected</textcolor>
          <align>center</align>
          <aligny>center</aligny>
          <height>96</height>
          <animation effect="slide" end="-800,0" time="600">WindowClose</animation>
        </control>
      </focusedlayout>


      <content>

        <item id="103">
          <description>Music</description>
          <label>31004</label>
          <onclick>ActivateWindow(Music)</onclick>
        </item>

        <item id="105">
          <description>Movies</description>
          <label>31006</label>
          <onclick>ActivateWindow(Video,movietitles)</onclick>
          <visible>Library.HasContent(Movies)</visible>
        </item>

        <item id="106">
          <description>TV Shows</description>
          <label>31007</label>
          <onclick>ActivateWindow(Video,tvshowtitles)</onclick>
          <visible>Library.HasContent(TVShows)</visible>
        </item>

        <item id="109">
          <description>Weather</description>
          <label>31010</label>
          <onclick>ActivateWindow(weather)</onclick>
        </item>

        <item id="113">
          <description>Play Disc</description>
          <label>31014</label>
          <onclick>PlayDVD</onclick>
          <visible>System.HasMediadvd</visible>
        </item>

      </content>

    </control>

  </controls>

</window>
Reply
#4
(2014-06-02, 21:32)CHRlS Wrote: here is my complete home.xml
the animation is at focusedlayout

Code:
<?xml version="1.0" encoding="UTF-8"?>
<window id="0">
  <defaultcontrol always="true">100</defaultcontrol>
  <allowoverlay>yes</allowoverlay>

  <controls>
    <include>GlobalBackground</include>
    <include>BottomBar</include>


    <control type="fixedlist" id="100">
      <description>Home Fixedlist</description>
      <orientation>horizontal</orientation>
      <posx>-240</posx>
      <posy>984</posy>
      <width>2160</width>
      <height>96</height>
      <onup>100</onup>
      <ondown>100</ondown>
      <onleft>100</onleft>
      <onright>100</onright>
      <focusposition>3</focusposition>
      <scrolltime>200</scrolltime>


      <itemlayout width="400" height="96">
        <control type="label">
          <info>ListItem.Label</info>
          <font>Home</font>
          <textcolor>Unselected</textcolor>
          <align>center</align>
          <aligny>center</aligny>
          <height>96</height>
        </control>
      </itemlayout>

      <focusedlayout width="400" height="96">
        <control type="label">
          <info>ListItem.Label</info>
          <font>Home</font>
          <textcolor>Selected</textcolor>
          <align>center</align>
          <aligny>center</aligny>
          <height>96</height>
          <animation effect="slide" end="-800,0" time="600">WindowClose</animation>
        </control>
      </focusedlayout>


      <content>

        <item id="103">
          <description>Music</description>
          <label>31004</label>
          <onclick>ActivateWindow(Music)</onclick>
        </item>

        <item id="105">
          <description>Movies</description>
          <label>31006</label>
          <onclick>ActivateWindow(Video,movietitles)</onclick>
          <visible>Library.HasContent(Movies)</visible>
        </item>

        <item id="106">
          <description>TV Shows</description>
          <label>31007</label>
          <onclick>ActivateWindow(Video,tvshowtitles)</onclick>
          <visible>Library.HasContent(TVShows)</visible>
        </item>

        <item id="109">
          <description>Weather</description>
          <label>31010</label>
          <onclick>ActivateWindow(weather)</onclick>
        </item>

        <item id="113">
          <description>Play Disc</description>
          <label>31014</label>
          <onclick>PlayDVD</onclick>
          <visible>System.HasMediadvd</visible>
        </item>

      </content>

    </control>

  </controls>

</window>



If you wish the whole list to slide away, you need to put the animation outside the fixedlist. Create a Group Control and put the list inside it

Code:
<control type="group">
    <animation xxxx  >WindowClose</animation>
     <control type="fixedlist" id="100">
          .
          .
      </control>
</control>
Reply
#5
i don't want the whole list, only the selected item, the others should fade away. there is just no fade animation at itemlayout yet because i wanted to get the slide animation working first.
Reply
#6
Not possible as far as I can tell but you can fake it -

PHP Code:
            <control type="label">
                <
posx>nn</posx>
                <
posy>nn</posy>
                <
info>Container(ID).ListItem.Label</info>
                <
font>Home</font>
                <
textcolor>Selected</textcolor>
                <
align>center</align>
                <
aligny>center</aligny>
                <
height>96</height>
                <
animation effect="slide" end="-800,0" time="600">WindowClose</animation>
            </
control
Reply
#7
thank you, with this workaround it works Big Grin
Reply

Logout Mark Read Team Forum Stats Members Help
How can a window change be animated0