I remember coming across a tutorial a few years back about animating a layout component using the clock component. Back then I did not have the requirement for that, but now I can't seem to find it anywhere. If I remember clearly, what the tutorial did is used the clock component to change a horizontal arrangement's height percent gradually to 0. Any idea how to do that?
By the way another question is that in the PuraVida extension page i see that a lot of the extensions are not available anymore, one of which does the animation i am looking for. Why are the extensions not available anymore?
No matter, I would rather do the animation without any of the extensions.
Add a Clock component to your app. Uncheck the TimerAlwaysFires and TimerEnabled boxes.
Decide how long in seconds it should take for the height percent to reach 0.
Assuming you start from 100% and want to reduce by 1% each set interval then set the TimerInterval to (10 x number of seconds).
Then in your blocks enable the Clock and reduce the height percent by 1% each time the Clock fires. Make sure when the height is reduced to 0 that you disable the Clock.
Well I got it to work, but is there a way to get HorizontalArrangement.HeightPercent via blocks? Or should I use DynamicComponents.GetProperty for that?
A pseudocode for why I need that:
if (heightPercent > 0){
//Do Animation for Collapsing HorizontalArrangement by gradually decreasing to 0.
}
if (heightPercent < 25) {
//Do Animation for Expanding HorizontalArrangement by gradually increasing to 25.
}
I am very sorry. I just realised that I should not have posted heightPercent problem here, instead create a new topic if a solution is already not found anywhere. Sorry I got carried away.