Android Question panel animation

jazzzzzzz

Active Member
Licensed User
Longtime User
I need a panel to come from bottom of the screen and stop it a particular position...i know it can be done with animation library...but from the example i cant recreate my need...so please gave me a example for creating a panel and to move it to a position .i just need translation animation
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Here:
B4X:
Sub Globals
   Dim pnl As Panel
   Dim anim As Animation
End Sub

Sub Activity_Create(FirstTime As Boolean)
   pnl.Initialize("pnl")
   pnl.Color = Colors.Red
   Activity.AddView(pnl, 0, 100%y, 100%x, 200dip)
   anim.InitializeTranslate("anim", 0, 0, 0, -200dip)
   anim.Duration = 1000
   anim.Start(pnl)
End Sub

Sub anim_AnimationEnd
   pnl.Top = 100%y - 200dip
End Sub
 
Upvote 0
Top