2016-02-11 55 views
0

我創造了利用TabLayout和ViewPager和使用FragmentPagerAdapter與viewpager標籤佈局阻塞控制

   <android.support.design.widget.TabLayout 
        android:id="@+id/a" 
        android:layout_width="match_parent" 
        android:layout_height="wrap_content" 
        app:tabMode="scrollable" 
        android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"/> 

       <android.support.v4.view.ViewPager 
        android:id="@+id/b" 
        android:layout_width="match_parent" 
        android:layout_height="wrap_content" 
        android:layout_below="@id/a"> 
       </android.support.v4.view.ViewPager> 

       <EditText 
        android:layout_width="match_parent" 
        android:layout_height="wrap_content" 
        android:layout_below="@id/b" 
        android:text="@string/about"/> 

的Android應用中的EditText問心無愧在屏幕上從來沒有表現出即使所有的控制是蓋通過滾動型

我不知道是什麼原因這個

回答

0

嘗試

<RelativeLayout ... 
    android:layout_width="match_parent" 
    android:layout_height="match_parent"> 

       <android.support.design.widget.TabLayout 
        android:id="@+id/a" 
        android:layout_width="match_parent" 
        android:layout_height="wrap_content" 
        app:tabMode="scrollable" 
        ... 
        /> 
       <EditText 
        android:id="@+id/text" 
        android:layout_width="match_parent" 
        android:layout_height="wrap_content" 
        android:layout_alignParentBottom="true" 
        android:text="@string/about"/> 

       <android.support.v4.view.ViewPager 
        android:id="@+id/b" 
        android:layout_width="match_parent" 
        android:layout_height="match_parent" 
        android:layout_above="@id/text" 
        android:layout_below="@id/a"> 
       </android.support.v4.view.ViewPager> 
</RelativeLayout> 
+0

但我想顯示t他在所有選項卡的標籤佈局內容下方顯示文字 –

+0

您要按從上到下的順序排列:1.標籤佈局2.常用文本3.可滾動的ViewPagerContent? – AndreyICE

+0

不,我想在所有標籤的最底部 –