I’m new at Android Development, but I want to start with it. I’ve currently a problem, I searched for hours, but I couldn’t find a solution.
Currently I used this tutorial:
http://arvid-g.de/12/android-4-actionbar-with-tabs-example
I implemented it with ActionBarSherlock, it worked like expected, but I want that after switching the tabs and then when switching back to a Tab what was already initialized, that it doesn’t get reinitialized, they should open the same View as it was.
How I realize this?
If there is an example to show how it is realized it would be a lot easier to understand.
If I understand correctly, each Tab of the application is a Fragment, to switch back to a tab to its state after initialisation, you must ‘restore’ the state of the fragment once you come back to it.
This stackoverflow question highlights how you can restore the state of the Fragment: android fragment- How to save states of views in a fragment when another fragment is pushed on top of it
Of course, all this is documented in the Fragment guide: http://developer.android.com/guide/components/fragments.html
Do let me know if you have more questions