개발/개발 자료

[Android] 간단하게 탭호스트 구현하기

시원한물냉 2013. 10. 3. 14:34
여러개 만들고싶으면 addTab을 여러개 해주면 된다.

간단하게 구현하였다!


TabHost tabhost = getTabHost();
		
tabhost.addTab(tabhost.newTabSpec("tag").setIndicator("탭명", getResources().getDrawable(아이콘))
				.setContent(new Intent(this, 보여줄 Activity.class)));