Kodi Community Forum

Full Version: Fixed List animation trigger problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm working on an android TV clone, and am having some problems with triggering a group animation based on the focus position of the songs in a fixed list. Below are some screen shots from a YouTube video showing the songs section in the Android TV PLex app. In Plex the item focus remains static, but the list and the album info pane move up/down with the list position. I have been able to replicate the list behavior, by setting the fixed list focus at "9", but no matter what I do, I cannot get the almbum info panel (created as a group) to move in sync. I've tried the onnext/onprevious, and container has focus, but no movement is triggered. I'm very much a novice at this, so can anyone give me a clue as to how I could get this to work? Thanks very much.

watch gallery
Container(xxx).Position(y)
Thanks very much, Pecinko. Bear with me, as I do not have very much skinning experience, but this would attach to the group I want to move (the album info)? If so, how would I determine the "y" coordinates? Using the fixed list ID, and various "y" values produced no animation. I want the album info group to move up the page each time the song list scrolls down, and vise versa.. Each list item is 65 px high, so I need the album info to scroll up/down by multiples of that amount for each scroll of the fixed list. I hope this makes sense, and thanks again for your quick response.
Xxx is an ID of a list of your songs/album, while y is a currently focused position in that list. Position 2 would mean 3rd item in album/song list has a focus. You would then move a group with album info based on a current position in a list. Take a look at Quartz and how blue list rectangle is moved based on a container position.
Thanks very much! Will try when I get home.
Unfortunately, animation occurs only if I use a number greater than 2 for movement. However, that locks the list from scrolling for that number of list items. I see that in the Quartz song list where you have a movement number set to 5. If I just use the code you have me without an animation number, the album info moves immediately to the y value of the ninth list item and remains there (focus is set to 9).

Thanks again, and if I can get this working, I will post it.
The problem is because when using a fixed list Container(id).Position is always the focus position in the list.

Can you post a link to the video in question so I can see exactly what effect you're after?
This should be true for container(ID).HasFocus but NOT for Container(ID).position
Thank you Hitcher and Pecinko. Finally got it working by attaching the animation to the entire group view, and setting the focus position at 1 and the movement at 20. I will post a link to the video.

It,s about midway through when he enters Plex music.

https://www.youtube.com/watch?v=atX6ILqK3SM
(2014-12-09, 15:08)dgm1960 Wrote: [ -> ]Thank you Hitcher and Pecinko. Finally got it working by attaching the animation to the entire group view, and setting the focus position at 1 and the movement at 20. I will post a link to the video.

It,s about midway through when he enters Plex music.

https://www.youtube.com/watch?v=atX6ILqK3SM

There is probably something wrong in your code, focus position and movement should not affect your animation if you use container(id).position as a animation condition.
@ pecinko Container(id).Position will return the focus position and in a fixed list this constant unless movement is used.

@dgm1960 By setting the focus position to 1 and movement to 20 (which will break your animation if there's more than 20 songs) you're effectively turning it into a normal list. In which case that's exactly what you should do and remove focus position and movement.
Thanks again for your help on this, both of you. I will do as you suggest, Hitcher.