Android Question Strange behavior of SetLayoutAnimated

F.Campanella

Member
Licensed User
Longtime User
Hi,
When I use this, the behavior is a little weird:

If I make this call to any view (panels, labels, ImageViews, etc.etc.) e.g.:

B4X:
     pan.SetLayoutAnimated(400, mLeft, mTop, 200dip, 200dip)

the panel grow correctly in 400 milliseconds but if I call this (for close panel in animated mode)


B4X:
     pan.SetLayoutAnimated(400, mLeft, mTop, 0dip, 0dip)

the panel shrinks instantly

what I do wrong?

Thanks!
 

Johan Schoeman

Expert
Licensed User
Longtime User
Hi,
When I use this, the behavior is a little weird:

If I make this call to any view (panels, labels, ImageViews, etc.etc.) e.g.:

B4X:
     pan.SetLayoutAnimated(400, mLeft, mTop, 200dip, 200dip)

the panel grow correctly in 400 milliseconds but if I call this (for close panel in animated mode)


B4X:
     pan.SetLayoutAnimated(400, mLeft, mTop, 0dip, 0dip)

the panel shrinks instantly

what I do wrong?

Thanks!
See what I have done in this example. Maybe it helps....
https://www.b4x.com/android/forum/threads/panel-blinking.43234/#post-329256
 
Upvote 0
Top