I have a very simple Flex application for mobile phones which uses 3 tabs (with the TabbedViewNavigatorApplication
).
It seems that everytime I switch tabs, the selected view is reloaded.
I've set a creationComplete command to do something and everytime I click on the tab it executes the function.
Isn't it possible for the views to get loaded 1 time and that's it?
Seems to me that this behaviour is exactly the point on mobile devices since you want to keep memory / cpu usage as low as possible.
This effectively means destroying all non-active views and all related view components / objects.
However you can override this default behaviour by setting the destructionPolicy
on every view to destructionPolicy="never"
.
This blog post will explain the basic understanding you will need to obtain.
Cheers