안드로이드 개발 질문/답변
(글 수 45,052)
안녕하세요~ 가입하고 첫 질문을 올립니다.
제가 하단에 탭위젯을 올렸고 탭버튼을 약간 커스텀하였습니다.
그런 하단의 라인은 어떻게 해도 제거가 되지 않네요~
비활성화된 버튼을 크게 만들어서 라인을 제거 하거나 라인을 색을 바꿀수 있는 방법이 있나요??
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center_horizontal">
<TabHost
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="bottom" />
</TabHost>
</LinearLayout>
2010.12.07 16:23:55
해결 되었습니다. 감사합니다.
TabHost tabHost = getTabHost();
tabHost.addTab(tabHost.newTabSpec("tab1")
.setIndicator("")
.setContent(new Intent(this, TabGroup1.class)));
tabHost.addTab(tabHost.newTabSpec("tab2")
.setIndicator("")
.setContent(new Intent(this, TabGroup2.class)));
tabHost.addTab(tabHost.newTabSpec("tab3")
.setIndicator("")
.setContent(new Intent(this, TabGroup3.class)));
tabHost.addTab(tabHost.newTabSpec("tab4")
.setIndicator(new LinearLayout(this))
.setContent(new Intent(this, TabGroup4.class)));
tabHost.getTabWidget().getChildAt(3).setVisibility(View.GONE);
2011.07.11 17:01:57
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:tabStripEnabled="false" />
tabStripEnabled 이용해보세요~
2011.07.19 14:29:55
ㄴ 흠. 넥서스원 진저에서는 잘 되는데, 갤탭 프로요에서는 잘 안되네요.
stackoverflow의 댓글들에서도 의견이 분분합니다.
http://stackoverflow.com/questions/3511596/get-rid-of-the-line-under-tabwidget
그거 날리려면 안보이는 탭 하나 추가 하시고, 탭 인디케이터에 뷰를 주시면 됩니다.