mcqueccu Well-Known Member Licensed User Longtime User Nov 25, 2021 #1 Hello, I am working on my first custom view to be packaged as b4xlib. I need some direction why mBase_AnimationCompleted is not working. The sample code in the Main Module when applied to a pane works fine with B4X: Pane1.SetColorAnimated(duration,xui.Color_RGB(R_initial_color,G_initial_color,B_initial_color),xui.Color_RGB(R_second_color,G_second_color,B_second_color)) Wait For pane1_AnimationCompleted R_initial_color = R_second_color But in the customview class module, when I change the pane1 to mBase declared as B4Xview, the animationcompleted is not working. B4X: mBase.SetColorAnimated(mDuration,xui.Color_RGB(R_initial_color,G_initial_color,B_initial_color),xui.Color_RGB(R_second_color,G_second_color,B_second_color)) Wait For mBase_AnimationCompleted R_initial_color = R_second_color
Hello, I am working on my first custom view to be packaged as b4xlib. I need some direction why mBase_AnimationCompleted is not working. The sample code in the Main Module when applied to a pane works fine with B4X: Pane1.SetColorAnimated(duration,xui.Color_RGB(R_initial_color,G_initial_color,B_initial_color),xui.Color_RGB(R_second_color,G_second_color,B_second_color)) Wait For pane1_AnimationCompleted R_initial_color = R_second_color But in the customview class module, when I change the pane1 to mBase declared as B4Xview, the animationcompleted is not working. B4X: mBase.SetColorAnimated(mDuration,xui.Color_RGB(R_initial_color,G_initial_color,B_initial_color),xui.Color_RGB(R_second_color,G_second_color,B_second_color)) Wait For mBase_AnimationCompleted R_initial_color = R_second_color
LucaMs Expert Licensed User Longtime User Nov 25, 2021 #2 Use Sleep(mDuration) instead of Wait For. Upvote 0 Solution