Q:

Swaping Fragments with actionbar tabs

I have 3 fragments in my app divided into 3 tabs respectively [1] [2] [3]. 
Imagine that I use a button on the fragment [1] that will make a TextView with an initial text "X" becomes a "Y" Ex: tv.setText("I'm a new text");
So when I navigate between tabs and I return to the tab [1], the TextView is back with the original text.  It is as if the onCreate() was calling again. 
I wish somehow that onStop() was not called in my fragments, retaining all the properties of my views (such as text, visibility etc.)  in memory while I swap between tabs. 
Thanks! 
---- EDIT! ---- 
Well, I found the solution to what I wanted!  It's simple enough I declare that: 
mPager = (ViewPager) findViewById(R.id.pager);
mPager.setOffscreenPageLimit(3); //Number of fragments that I wish to store in memory 

A:

onCreate method is being called again.  You can save the values by overriding onSavedInstanceState and get them back in onActivityCreated method.  For example lets save boolean(you can save whatever you want - string, int etc..):
save the value:
public void onSaveInstanceState(Bundle outState) {
        outState.putBoolean("booleanValue", true);
}

restore the value (you can call this in onCreate as well):
    protected void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
            if (savedInstanceState ! = null && savedInstanceState.containsKey("booleanValue")) {
                boolean myBoolean = savedInstanceState.getBoolean("booleanValue");
            }
    }

