Posts: 2,087
Joined: Jun 2007
Reputation:
92
djh_
Aeon Project Founder
Posts: 2,087
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
Posts: 967
Joined: May 2017
Reputation:
83
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>
Posts: 2,087
Joined: Jun 2007
Reputation:
92
djh_
Aeon Project Founder
Posts: 2,087
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
Posts: 2,087
Joined: Jun 2007
Reputation:
92
djh_
Aeon Project Founder
Posts: 2,087
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
Posts: 2,087
Joined: Jun 2007
Reputation:
92
djh_
Aeon Project Founder
Posts: 2,087
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
Posts: 2,087
Joined: Jun 2007
Reputation:
92
djh_
Aeon Project Founder
Posts: 2,087
2019-06-20, 22:33
(This post was last modified: 2019-06-20, 23:10 by djh_.)
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
Posts: 3,027
Joined: Jan 2013
Reputation:
209
Gade
Team-Kodi Member
Posts: 3,027
It makes a lot of sense :-)
Glad you got it solved.
Posts: 7,806
Joined: Feb 2013
Reputation:
1,486
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).