iOS Question Sanity check: Isn't ".SetVisibleAnimated(0, True)" and ".Visible = True" the same?

Sandman

Expert
Licensed User
Longtime User
Shouldn't these two in effect do the same thing?
B4X:
myPanel.SetVisibleAnimated(0, True)
    
myPanel.Visible = True

I have a situation where I used the bottom one, because that worked fine in B4A and B4J. However, in B4i I need to use the top one to make the panel visible.

(If it matters, the panel is initially visible and then faded to not visible using .SetVisibleAnimated(3000, False).)
 

Sandman

Expert
Licensed User
Longtime User
I had to focus on other things for some time and forgot about this. Now I came back to this part of my code and re-discovered the problem.

I managed to make a very small project that does show the problem. There are two things to test:

- Press the button when the red box IS NOT showing - everything continues to work as expected.
- Press the button when the red box IS showing - the box is gone forever.

To summarize, this seems to be the problem: Iff a view is visible and is touched by SetVisibleAnimated, then it can't get back its visibility using Visible.

(I checked in B4A and there this all works as expected.)
 

Attachments

  • blinker.zip
    3 KB · Views: 79
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…