Itemlayout/Focusedlayout animations/conditions
#1
Why is it that if I set a bunch of animations for controls within the itemlayout or focusedlayout for a list, with conditions based on the visibility of that list, the animations start firing whenever I'm scrolling through the list items? Theoretically the animations should just fire once when the list becomes visible, but it seems that condition is being re-evaluated as true whenever the list item is changed, on a per-item basis.
www: deadendthrills.com
follow on twitter for updates, etc: @deadendthrills
Reply
#2
are you usinf focus and unfocus ?
<animation effect="rotatex" end="360" center="auto" time="800" loop="false" reversible="false" >Focus</animation>
<animation effect="rotatey" end="-360" center="auto" time="800" loop="false" reversible="true" >Unfocus</animation>
Reply
#3
I'm not using focus and unfocus because I don't want any animations at all when scrolling between the items. I simply want a delayed fade on the entire list when it becomes visible. Setting a fade animation on the list itself seems to break it - it just never appears - hence why I'm trying to fade the subitems of the list.
www: deadendthrills.com
follow on twitter for updates, etc: @deadendthrills
Reply
#4
Can you place the list in a group and put an animation in that?

Something like:
Code:
<control type="group">
   <animation effect="fade" start="0" end="100" time="300" condition="Control.IsVisible(9000)">Conditional</animation>

   <control type="list" id="9000">
      …
      <visible>blablabla</visible>
   </control>
</control>


Or even simpler only on WindowOpen:
Code:
<control type="group">
   <animation effect="fade" start="0" end="100" time="300">WindowOpen</animation>

   <control type="list" id="9000">
      …
   </control>
</control>
Reply
#5
Tried putting it in a group earlier, but while the animation did fire the first time, it then stopped. WindowOpen doesn't help because it's a content-centric switch I'm doing, the new list only fading in when moving from tvshows to seasons. I wouldn't have to worry about these animations at all if I could just mask everything at WindowOpen, but because it's a switch from one view type to another, I need a delayed fade in when the second view becomes visible. I can confirm that other screen furniture doesn't suffer the same problem - the fade animations correctly fire when the 'seasons/episodes' become visible, and only then - and so the list containers and their sub-controls are the problem.
www: deadendthrills.com
follow on twitter for updates, etc: @deadendthrills
Reply
#6
Just a random thought as I'm not quite following what you're trying to do.

Maybe use something similar to this in a group - perhaps with other bools (haven't tested these). And maybe only with the first fade animation:

Code:
<animation effect="fade" start="0" end="100" time="300" reversible="false" condition="Control.IsVisible(xxx) + Integer.IsGreater(Container(xxx).NumItems,0)">Conditional</animation>
<animation effect="fade" start="100" end="0" time="300" reversible="false" condition="!Control.IsVisible(xxx) | Integer.IsEqual(Container(xxx).NumItems,0)">Conditional</animation>
Reply
#7
I can give some more detail about this.

1) I give a list container sub-control a conditional animation based on the visibility of either the list container itself, or another control which becomes visible when the list container does.

2) The animation fires correctly when the list container becomes visible. However, it also fires the first time each visible list item is selected. So, if the list container has five visible items, the animation will fire the first time you select each one, but you can then scroll between them again and it won't.

3) Any time a new item enters the list, the animation will also fire (which it shouldn't) upon that item being selected.
www: deadendthrills.com
follow on twitter for updates, etc: @deadendthrills
Reply
#8
Another idea:

Code:
<control type="group">
   <visible>Control.IsVisible(xxx)</visible>
   <animation effect="fade" start="0" end="100" time="300">VisibleChange</animation>

   <control type="list" id="xxx">
   …

You can try using
Code:
<visible>Integer.IsGreater(Container(xxx).NumItems,0)<visible>
if the list needs to be populated first.
Reply
#9
Just tried it. Same problem as before with wrapping it in a group: the fade works correctly the first time but then breaks. It stays broken until you reload the skin.

For reference, my work build is:

LibreELEC-Generic.x86_64-9.0-Milhouse-20181022210409-#1022

EDIT: The problem is ultimately that while the condition is correct and is being met - because other controls correctly respond to it - the list sub-controls are not behaving as they should. The wiki states that they should accept Focus and Conditional animations, but in this case they're firing those Conditional animations arbitrarily whenever a content item is selected for the first time. Trying to counter this by adding extra conditions (like !Container(xxx).OnNext) doesn't seem to matter, because the animation seems to ignore the conditions entirely. ¯\_(ツ)_/¯

EDIT EDIT: I seem to have solved it - kinda. Wrapping the list in a group wasn't working because my whole view - the list and all its furniture - was already wrapped in a group, meaning I was creating a sub-group. Once I rearranged everything so that there was just a single group involved, and applied the animation to that, applying a fade to the entire list group worked properly every time. Hope that makes sense.
www: deadendthrills.com
follow on twitter for updates, etc: @deadendthrills
Reply
#10
It makes a lot of sense :-)

Glad you got it solved.
Reply
#11
BTW most likely the reason the animation wont work **inside** item/focusedlayout is because item/focusedlayout only accepts references to ListItem infolabels. Window properties or Container references won't work (they will sometimes have values, but the values will be inconsistent or incorrect).
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply

Logout Mark Read Team Forum Stats Members Help
Itemlayout/Focusedlayout animations/conditions0