deepesh
deepesh

Reputation: 1

Reload tab in android

I have tabhost in my application(2 tabs),when i select tab2 the content has been dislayed has a list view ,again i have list click event here to move further another list view,here the 2tab already in selected mode and it's focus not been changed,when i click the 2tab again i need it to reload its content has loaded initially with first list view content.how can i get it.

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    TabHost tabHost = getTabHost();       

  tabHost.addTab(tabHost.newTabSpec("tab1")
          .setIndicator("OPT")
          .setContent(new Intent(this, TabGroup1Activity.class)));

  tabHost.addTab(tabHost.newTabSpec("tab2")
          .setIndicator("EDIT")
          .setContent(new Intent(this, TabGroup2Activity.class)));

  tabHost.setCurrentTab(1); 

      }

Upvotes: 0

Views: 577

Answers (2)

Jimmy
Jimmy

Reputation: 16428

You could also re-issue another intent to refresh the tab

Upvotes: 2

sandy
sandy

Reputation: 3351

try public void onResume() {} method

Upvotes: 0

Related Questions