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>之後