2014-03-31 49 views

回答

0

您可以滑動菜單使用標籤。你應該把滑動菜單的第二個孩子中有選項卡的佈局。

<android.support.v4.widget.SlidingPaneLayout xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:tools="http://schemas.android.com/tools" 
android:id="@+id/sliding_layout" 
android:layout_width="match_parent" 
android:layout_height="match_parent" > 

<RelativeLayout 
    android:id="@+id/drawer_relative" 
    android:layout_width="280dp" 
    android:layout_height="match_parent" 
    android:layout_gravity="left" > 

    <FrameLayout 
     android:id="@+id/list_fragment_id" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" > 
    </FrameLayout> 
</RelativeLayout> 

<android.support.v4.app.FragmentTabHost 
    android:id="@android:id/tabhost" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" > 

    <LinearLayout 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:orientation="vertical" > 

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

     <FrameLayout 
      android:id="@+id/realtabcontent" 
      android:layout_width="match_parent" 
      android:layout_height="0dp" 
      android:layout_weight="1" /> 

     <TabWidget 
      android:id="@android:id/tabs" 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:layout_weight="0" 
      android:orientation="horizontal" 
      android:showDividers="none" /> 
    </LinearLayout> 
</android.support.v4.app.FragmentTabHost> 

+0

你的意思是作爲一個fragmentActivity只要使用這個驚人的課嗎? – Amira

+0

具有Sliding菜單的片段活動可以具有包含選項卡的片段。 –

+0

我也不工作 – Amira

相關問題