开发者

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.addT开发者_StackOverflowab(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); 

      }


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


try public void onResume() {} method

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜