Android Question I need A simple way to slide a panel

JakeBullet70

Well-Known Member
Licensed User
Longtime User
Hi all.

I am looking for a way to slide a panel from off screen to on screen and then back again.
I have done some searching on the forum but seem to only find example in libs'
How can I do this?

Thanks!
 

DonManfred

Expert
Licensed User
Longtime User
by code?
 
Upvote 0

Beja

Expert
Licensed User
Longtime User
Make the initial left property to -panel1.width then increase it by incriminating the left with the speed you wish (timer).
you do the opposite when you want to hide it.
 
Upvote 0

Beja

Expert
Licensed User
Longtime User
Activity.Create
Panel1.Left = -Panel1.Width

Button1_Click
Timer1.Enabled = True

Timer1_Tick
If Panel1.Left < 0 then
Panel1.Left = Panel1.Left + (value)
If Panel1.left = 0 (or any other value depending on its width) then
Timer1.Enabled = False

and so on
 
Upvote 0

JakeBullet70

Well-Known Member
Licensed User
Longtime User
The timer makes for jerky animation.
I am trying the animation lib. This seems to be working very good.
 
Upvote 0
Top