2012-05-07 4 views

답변

0

해당 코드의 레이아웃을 찾았습니다.

<TabHost 
      android:id="@android:id/tabhost" 
      android:layout_width="match_parent" 
      android:layout_height="match_parent" 
      > 
      <LinearLayout 
       android:orientation="vertical" 
       android:layout_width="fill_parent" 
       android:layout_height="fill_parent" 
       > 

       <TabWidget 
        android:id="@android:id/tabs" 
        android:orientation="horizontal" 
        android:layout_width="fill_parent" 
        android:layout_height="wrap_content" 
        android:weightSum="0" 
        /> 

       <FrameLayout 
        android:id="@android:id/tabcontent" 
        android:layout_width="0dp" 
        android:layout_height="0dp" 
        android:layout_weight="0" 
        /> 

       <android.support.v4.view.ViewPager 
        android:id="@+id/viewpager" 
        android:layout_width="fill_parent" 
        android:layout_height="0dp" 
        android:layout_weight="1" 
        android:padding="10dp" 
        /> 

      </LinearLayout> 
     </TabHost> 

잘 작동합니다.

0

안녕하세요 점검이 example

나는 viewpager로 조각을 사용했다. Here

+0

코드는 TabHost를 사용하지 않습니다. – jayellos

0

에서

다운로드 소스는 아마 당신은이 post을 볼 수 있습니다. 여기에 사용자 정의 Tabhost를 구현하는 방법이 설명되어 있습니다.

+0

감사합니다. 그러나 코드는 Tabhost를 사용하지 않으므로 Google의 FragmentTabsPager.java를 적용 할 수 없습니다. – jayellos