当前位置: 代码迷 >> Android >> tabhost的主activity和各个页面之间怎么通讯
  详细解决方案

tabhost的主activity和各个页面之间怎么通讯

热度:41   发布时间:2016-05-01 17:51:39.0
tabhost的主activity和各个页面之间如何通讯?
spec = tabHost.newTabSpec("tab1")
.setIndicator("Tab1", res.getDrawable(R.drawable.aaa))
.setContent(intent);
tabHost.addTab(spec);

  intent = new Intent(this, ActStatus.class);
spec = tabHost.newTabSpec("tab2")
.setIndicator("Tab2", res.getDrawable(R.drawable.bbb))
.setContent(intent);
tabHost.addTab(spec);
 
如上代码。tab1 tab2 如何和主activity发送消息?

------解决方案--------------------
不是用intent?
------解决方案--------------------
是要把tab绑定到view上吗,通过更新view来更新tab?
  相关解决方案