刷新的Android标签无意



请如何在不添加意图的情况下刷新Tab 2(Tag 2,Live Blog)的内容。

tabhost th =(tabhost)findViewById(r.id.tabhost1); th.setup();

     TabHost.TabSpec spec = th.newTabSpec("tag1")
     .setIndicator("Testimonies", getResources()
      .getDrawable(R.drawable.icon_testimonies_tab))
        .setContent(R.id.tab1);
           th.addTab(spec);

     spec = th.newTabSpec("tag2")
     .setIndicator("Live Blog", getResources()
     .getDrawable(R.drawable.icon_liveblog_tab))
      .setContent(R.id.tab2);
        th.addTab(spec);

        spec = th.newTabSpec("tag3")
        .setIndicator("Streaming Settings", getResources()
        .getDrawable(R.drawable.icon_streamingsetting_tab))
        .setContent(R.id.tab3);
          th.addTab(spec);
          th.setCurrentTab(1);
          th.getCurrentView().setVisibility(View.VISIBLE);

我们再次看到",@meduteniopeyemi!我努力工作,以解决您正在谈论的问题。我曾经做过的痛苦是:

tabHost.setOnTabChangedListener(new OnTabChangeListener() {
                    public void onTabChanged(String tabId) {
                            //YOUR CODE checking if "tabId" is the tab you want to REFRESH
                    }
            });

它对我来说工作效果。它只允许您在没有问题的情况下进行任何刷新。

最新更新