글
인플레이션(inflation)을 통해 탭 위젯 구현하기
인플레이션 구현 복습
해당 액티비티의 객체를 연결해 주는 infalter를 전달받고 그 inflater에 Layout과 TabHost를 등록
LayoutInflater inflater = LayoutInflater.from(this);
inflater.inflate(R.layout.main, mytabhost.getContentview(), true);
탭 위젯 구현하기
탭 호스트 spec을 만들고 sepc에 Indicator와 setContent를 해 주고 나서
탭 호스트에 spec객체를 addTab();
TabHost mytabhost;
TabHost.TabSpec spec = mytabhost.new TabSpec("tag");
spec.setIndicator("탭이름"(;
spec.setContent(R.id.Layoutid);
mytabhost.addTab(spec);
'개발' 카테고리의 다른 글
웹 앱과 하이브리드 앱의 구분 (네이티브 앱, 모바일 웹) (0) | 2013.03.25 |
---|---|
[안드로이드]이클립스 안드로이드 설치 추가셋팅 (0) | 2013.03.20 |
[안드로이드]static과 싱글톤 (singleton) from JAVA (0) | 2013.03.14 |
[안드로이드]네트워크, 소켓(socket) (0) | 2013.03.13 |
[안드로이드]Thread, 핸들러(Handler), 포스트(Post), 루퍼(Looper) (0) | 2013.03.11 |
RECENT COMMENT