Hello there stackoverflow and nativescript users!
I have a problem with animating a view.
What I want: I am trying to create a view where you can click and it opens op a new view below animated pushing all other views further down.
Problem: Only the elements inside are animated or nothing is animated at all.
What I tried: I tried using the nativescript UI Animations but without success because the height property is not supported.
My version: https://gyazo.com/130c2b3467656bcc104c9b8e2c860d94
I would love to hear the solutions you all have come up with to tackle this.
You can use tweenjs in your nativescript application defining the following class which rely on tweenjs (install it with
npm i @tweenjs/tween.js
)Then, to animate the height of a view you can use a method like this (this one works in nativescript-vue but you just have to adapt the way you retrieve your view object) :
This was discussed here : https://github.com/NativeScript/NativeScript/issues/1764 I mainly improved the
onUpdate
to have a smooth animation