title: How to refresh tab contents on every time click-android
body: <p>ive three tabs with three different contents in android.Each tab retrieves data from server &amp; displayed it as listview(i.e three listviews on three tabs).i need to get refreshed on each tab on every time.But it gets refreshed on first time tab click only.How could i resolve this?</p>
  
  <p>My code:
  tabHost = getTabHost();
          getTabHost().invalidate();</p>
  
  <pre><code>    tabHost.addTab(tabHost.newTabSpec("tab1")
              .setIndicator("", getResources().getDrawable(R.drawable.home))
              .setContent(new Intent(this, Home.class)));
  
      tabHost.addTab(tabHost.newTabSpec("tab2")
              .setIndicator("", getResources().getDrawable(R.drawable.trip))
              .setContent(new Intent(this, Tript.class)));
  
      tabHost.addTab(tabHost
              .newTabSpec("tab3")
              .setIndicator("",
                      getResources().getDrawable(R.drawable.settings))
              .setContent(new Intent(this, Settings.class)));
  
      tabHost.setCurrentTab(0);
  </code></pre>
  
  <p>Ive resolved now as below way:</p>
  
  <p>.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);</p>