Invalid state means requires layout. Deinitialize means no longer visible 
to the user.
Say you want to delete a component and want it to fly out of the screen. 
Maybe even fade out while doing it.

myComponent.setX(getDisplayWidth());
myContainer.animateUnlayoutAndWait(400);
myComponent.remove();
myContainer.animateLayout(200);

I set the X of the component out of bounds. Then I call animate unlayout 
which returns the X to the original position in the layout, then animates 
the component out of the screen to the invalid position. This effectively 
gives the visual effect of a component "flying out". Now the component is 
no longer visible but there is a gap where it was. If I left it at that the 
component would return in the next layout operation...
I then remove the component as it's no longer necessary and run an 
animateLayout (which is the equivalent of revalidate) to layout the code. 
It will let the other components fill the gap left by the removed component 
with a nice animation.

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/36353f89-9472-472d-9403-838a51f57f2d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to