epiCode Active Member Licensed User Mar 23, 2023 #1 I am trying to move and animate a view at the same time. ( Basically move the top up or down while bottom of the view remains intact ) Setlayoutanimated method along with changing height would not work since movement will be animated but height change is instant and results in distortion of view contents. I tried animationplus but could not get it to work. Can someone please point me to alternate method / sample, to just make a single side of view move ? Thanks!
I am trying to move and animate a view at the same time. ( Basically move the top up or down while bottom of the view remains intact ) Setlayoutanimated method along with changing height would not work since movement will be animated but height change is instant and results in distortion of view contents. I tried animationplus but could not get it to work. Can someone please point me to alternate method / sample, to just make a single side of view move ? Thanks!
Solution Erel Mar 23, 2023 You just need to do a bit of math. Full example: Code: Copy Private Sub Button1_Click Panel1.SetLayoutAnimated(0, 0, 0, 100dip, 200dip) Panel1.SetLayoutAnimated(1000, 300dip, 100dip, 100dip, 100dip) End Sub
You just need to do a bit of math. Full example: Code: Copy Private Sub Button1_Click Panel1.SetLayoutAnimated(0, 0, 0, 100dip, 200dip) Panel1.SetLayoutAnimated(1000, 300dip, 100dip, 100dip, 100dip) End Sub
Erel B4X founder Staff member Licensed User Longtime User Mar 23, 2023 #2 You just need to do a bit of math. Full example: Code: Copy Private Sub Button1_Click Panel1.SetLayoutAnimated(0, 0, 0, 100dip, 200dip) Panel1.SetLayoutAnimated(1000, 300dip, 100dip, 100dip, 100dip) End Sub Upvote 0 Solution
You just need to do a bit of math. Full example: Code: Copy Private Sub Button1_Click Panel1.SetLayoutAnimated(0, 0, 0, 100dip, 200dip) Panel1.SetLayoutAnimated(1000, 300dip, 100dip, 100dip, 100dip) End Sub