title: non-foreground tabs created when clicking on another tab
body: <p>I developed an application that has three tabs and one activity that show these layouts. In total, I have 3 fragments. </p>
  
  <p>I studied many tutorials and used them.
  I have three fragment and each has the line</p>
  
  <p><code>return inflater.inflate(R.layout.tab_fragment_*, container, false);</code></p>
  
  <p>*1 or 2 or 3 according to which fragment.</p>
  
  <p>I put a break point on this line but I saw something happening that I can't understand.</p>
  
  <p>When I select tab1 in debug mode my debugger hits code in the fragment for tab2!!!!
  Then it hits code in the fragment for tab1, and then it shows the right result. When I select tab2 the debuger hits code in the fragment for tab3!!!! Then it shows the right results. When I select tab3 my debugger doesn't hit any of break points but shows right results.</p>
  
  <p>Help me please.</p>
  
  <p>I see right things but I can not understand it. By this behavior I can not add some action on button click on each tab(fragment in this case).</p>
  
  <p>one of my reference is :
  <a href="http://www.truiton.com/2015/06/android-tabs-example-fragments-viewpager/" rel="nofollow">http://www.truiton.com/2015/06/android-tabs-example-fragments-viewpager/</a></p>
  
  <p>ALSO i used Android 2.2 API.</p>