As you can see in the gif, i have a panel with some labels in it.
Now i only want to resize the root panel animated, but the childviews looks crazy during the animation.
How can i avoid this?
Private Sub SetHeightAnimated(v As B4XView, NewHeight As Int, Duration As Int)
Dim startTime As Long = DateTime.Now
Dim startHeight As Int = v.Height
Dim deltaHeight As Int = NewHeight - startHeight
Dim t As Long = DateTime.Now
Do While t < startTime + Duration
Dim h As Int = startHeight + deltaHeight * (t - startTime) / Duration
v.Height = h
Sleep(10)
t = DateTime.Now
Loop
v.Height = NewHeight
End Sub
?
I did not say that erel's solution does not work. I already use it.
Would have been nice to be able to use the speed curves of SetLayoutAnimated, but that will have to do for now.
?
I did not say that erel's solution does not work. I already use it.
Would have been nice to be able to use the speed curves of SetLayoutAnimated, but that will have to do for now.