2010-06-29 1 views

답변

1

TabHost와 관련없는 화면 디자인에 문제가있을 수 있습니다. 화면/위젯/레이아웃 패딩을 확인 했습니까?

다음 코드 스 니펫은 사용자가 원하는 것을 정확하게 수행합니다. 다른 탭을 추가하면됩니다.

<TabHost xmlns:android="http://schemas.android.com/apk/res/android" 
    android:id="@android:id/tabhost" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent"> 
    <RelativeLayout 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent"> 
     <TabWidget 
      android:id="@android:id/tabs" 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" 
      android:layout_alignParentBottom="true"/> 
     <FrameLayout 
      android:id="@android:id/tabcontent" 
      android:layout_width="fill_parent" 
      android:layout_height="fill_parent" 
      android:layout_above="@android:id/tabs"> 

      <include android:id="@+id/tab1" layout="@layout/tab1" /> 

      <include android:id="@+id/tab2" layout="@layout/tab2" /> 

      <include android:id="@+id/tab3" layout="@layout/tab3" /> 
     </FrameLayout> 
    </RelativeLayout> 
</TabHost> 
+1

안녕하세요 패딩 문제는 sdk 1.5에서만 존재합니다. 코딩을 1.6으로 변경하면 흰색 테두리가 자동으로 사라졌습니다. – Jana

0

Android: Tabs at the BOTTOM

난 여전히 사용자 지정하거나 탭 아래 줄을 해제 할 인터페이스가없는 경우는 모르겠지만,뿐만 아니라 답변에 관심이있을 것입니다.