2015-09-07 73 views

回答

0

是的,这是可能的。

假设您有一个垂直LinearLayout作为您的主布局。你会有这样的事情:

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:orientation="vertical"> 

    <!-- put your top widgets/progress bars here 
     their height needs to be fixed or wrap_content --> 

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

     <android.support.v4.view.PagerTabStrip 
      android:id="@+id/pagertabstrip" 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:layout_gravity="top" /> 

    </android.support.v4.view.ViewPager> 

</LinearLayout> 
相关问题