rraswisak Active Member Licensed User Longtime User Jul 8, 2019 #1 Hi, My B4A object use SetLayoutAnimated to make some animation, as in B4J we can use this code: Code: Copy 'B4J Code... Sub ShowLabel Dim lbl As Label lbl.Initialize("lbl") lbl.SetLayoutAnimated(1500,100,100,80,40) Wait For lbl_AnimationCompleted lbl.Text = "Done" End Sub In B4A SetLayoutAnimated method is available but not AnimationCompleted event as B4J does, previousely i use sleep to handle this situation, but it would be elegant if B4A can also has AnimationCompleted event so we can use Wait For. Thank you
Hi, My B4A object use SetLayoutAnimated to make some animation, as in B4J we can use this code: Code: Copy 'B4J Code... Sub ShowLabel Dim lbl As Label lbl.Initialize("lbl") lbl.SetLayoutAnimated(1500,100,100,80,40) Wait For lbl_AnimationCompleted lbl.Text = "Done" End Sub In B4A SetLayoutAnimated method is available but not AnimationCompleted event as B4J does, previousely i use sleep to handle this situation, but it would be elegant if B4A can also has AnimationCompleted event so we can use Wait For. Thank you
LucaMs Expert Licensed User Longtime User Jul 8, 2019 #2 +1 [attached a (not so smart) workaround]. Attachments AnimationCompleted.zip AnimationCompleted.zip 9.7 KB · Views: 410
rraswisak Active Member Licensed User Longtime User Jul 8, 2019 #3 Thank @LucaMs for the attachment and nice example, i'm done with this approach too... Using Sleep is the only option right now, i just wish can use AnimationCompleted event (internally) and using Wait For... as simple as B4J does
Thank @LucaMs for the attachment and nice example, i'm done with this approach too... Using Sleep is the only option right now, i just wish can use AnimationCompleted event (internally) and using Wait For... as simple as B4J does
LucaMs Expert Licensed User Longtime User Jul 8, 2019 #4 rraswisak said: Thank @LucaMs for the attachment and nice example, i'm done with this approach too... Using Sleep is the only option right now, i just wish can use AnimationCompleted event (internally) and using Wait For... as simple as B4J does Click to expand... Yes, I know... My + 1
rraswisak said: Thank @LucaMs for the attachment and nice example, i'm done with this approach too... Using Sleep is the only option right now, i just wish can use AnimationCompleted event (internally) and using Wait For... as simple as B4J does Click to expand... Yes, I know... My + 1