首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > Android >

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

2012-08-08 
tabhost的主activity和各个页面之间如何通讯?spec tabHost.newTabSpec(tab1).setIndicator(Tab1, re

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?

热点排行