iOS Question SetLayoutAnimated Not working!

Mike1970

Well-Known Member
Licensed User
Longtime User
i'm trying to animate a bit my UI but i noticed that the "SetLayoutAnimated" feature doensn't work, nothing is animated at all, the only behavior is: invisible, and then after the specified time visible in the position i wanted to be. Without any animation.

I don't understand why the setlayoutanimated doesn't work to me.
I published this thread to the "BUG?" but it was removed... I really don't understand why it behave like this.

example attached
 

Attachments

  • animation.zip
    2.1 KB · Views: 240

Semen Matusovskiy

Well-Known Member
Licensed User
Instead of
B4X:
    Panel1.Left = 0
    Sleep(1000)
    Panel1.SetLayoutAnimated(1000, 0, 100dip, Panel1.Top, Panel1.Width, Panel1.Height)
    Sleep(1000)
try, for example
B4X:
    Panel1.SetLayoutAnimated(0, 0, 0, 0, Panel1.Width, Panel1.Height)
    Panel1.SetLayoutAnimated(3000, 1, 100dip, Panel1.Top, Panel1.Width, Panel1.Height)
 
Upvote 0

Mike1970

Well-Known Member
Licensed User
Longtime User
Instead of
B4X:
    Panel1.Left = 0
    Sleep(1000)
    Panel1.SetLayoutAnimated(1000, 0, 100dip, Panel1.Top, Panel1.Width, Panel1.Height)
    Sleep(1000)
try, for example
B4X:
    Panel1.SetLayoutAnimated(0, 0, 0, 0, Panel1.Width, Panel1.Height)
    Panel1.SetLayoutAnimated(3000, 1, 100dip, Panel1.Top, Panel1.Width, Panel1.Height)
Tomorrow I will give it a try
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Read the documentation:
SXYeivbwGR.png


Tip: use B4XView whenever possible. The code will be cross platform and easier to understand.
 
Upvote 0

Mike1970

Well-Known Member
Licensed User
Longtime User
Read the documentation:
SXYeivbwGR.png


Tip: use B4XView whenever possible. The code will be cross platform and easier to understand.
I am sure to have tried at least one time ???.
Well I think is that the problem ??‍♂️
thanks
 
Upvote 0
Top