Avatar animate demo 1

In first demo for animate collapsing avatar need detect when avatar have gone to top and begin to collapse.

So, need to find avatarAnimateStartPointY and avatarCollapseAnimationChangeWeight (for convert general offset to avatar animate offset):

To convert general offset to avatr change offset using avatarCollapseAnimationChangeWeight :

So in updateViews method look how avatar change the size with change avatar’s X, Y position translation: