14.03.06
TabHost
1、创建类继承TabActivity
2、得到TabHost对象
getTabHost()
.NewTabSpc();--------->设置Tab页
tabhost.addTab(tabspc);----->添加
TabHost tabhost=getTabHost(); TabSpec tabSpec1=tabhost.newTabSpec("tag1"); tabSpec1.setIndicator("聊天"); tabSpec1.setContent(new Intent(MainActivity.this,FirstTabActivity.class)); tabhost.addTab(tabSpec1);
3、将tab布局移动到底部的方法
Height=”0dp”
Weight=”1”//随意
<TabWidget></TabWidget>置于<FrameLayout></FrameLayout>之后
原文:http://8629224.blog.51cto.com/8619224/1369568