Android Question Move and Resize Animation

epiCode

Active Member
Licensed User
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
You just need to do a bit of math. Full example:
B4X:
Private Sub Button1_Click
    Panel1.SetLayoutAnimated(0, 0, 0, 100dip, 200dip)
    Panel1.SetLayoutAnimated(1000, 300dip, 100dip, 100dip, 100dip)
End Sub
Top