WEB开发网
开发学院手机开发Android 开发 Tabhost 运用详解 阅读

Tabhost 运用详解

 2012-09-03 15:08:53 来源:WEB开发网   
核心提示:myMenuRes[0]));secondTabSpec.setIndicator("Topics", getResources().getDrawable(myMenuRes[1]));threeTabSpec.setIndicator("Video", getResource
myMenuRes[0]));
secondTabSpec.setIndicator("Topics", getResources().getDrawable(
myMenuRes[1]));
threeTabSpec.setIndicator("Video", getResources().getDrawable(
myMenuRes[2]));
fourTabSpec.setIndicator("Podcast", getResources().getDrawable(
myMenuRes[3]));
fiveTabSpec.setIndicator("Gallery", getResources().getDrawable(
myMenuRes[4]));


six.setContent(new Intent(this,FirstTab.class));
firstTabSpec.setContent(new Intent(this, FirstTab.class));

secondTabSpec.setContent(new Intent(this, SecondTab.class));
threeTabSpec.setContent(new Intent(this, FirstTab.class));
fourTabSpec.setContent(new Intent(this, SecondTab.class));
fiveTabSpec.setContent(new Intent(this, SecondTab.class));


/* Add tabSpec to the TabHost to display. */
tabHost.addTab(firstTabSpec);
tabHost.addTab(secondTabSpec);
tabHost.addTab(threeTabSpec);
tabHost.addTab(fourTabSpec);
tabHost.addTab(fiveTabSpec);
tabHost.addTab(six);
}
}

上一页  1 2 3 

Tags:Tabhost 运用 详解

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接