<!-- TabWidget 의 높이는 40px 로 설정한 경우 -->
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="40px"
/>
<!-- TabWidget 의 높이는 100px 로 설정한 경우 -->
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="100px"
/>
android:layout_height="40px" | android:layout_height="100px" |
높이를 69px 보다 작게하면 텍스트 영역이 사라지고 크게 하면 텍스트 아래쪽에 잉여 영역이 생기게 된다.
그래서 알아 본 정보로는 코드로 높이를 제어하는 방법이다. 아래 코드는 TabWidget 의 구성 탭을 탐색해서 높이를 바꾸는 코드이다.
for ( int tab = 0; tab < tabHost.getTabWidget().getChildCount(); ++tab )
{
tabHost.getTabWidget().getChildAt(tab).getLayoutParams().height = 100;
}
height = 40 인 경우 | height = 100 인 경우 |
<
Original Post : http://neodreamer-dev.tistory.com/420
No comments :
Post a Comment