是的,你可以做到這一點。 這裏是一個例子,如何做到這一點
佈局範例
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<!-- Static content -->
<LinearLayout
android:id="@+id/ll_bottom"
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_alignParentBottom="true"
android:background="@color/holo_blue_light"
android:orientation="vertical" />
<!-- ViewPager Indicator -->
<com.viewpagerindicator.LinePageIndicator
android:id="@+id/view_pager_indicator"
android:layout_width="fill_parent"
android:layout_height="20dp"
android:layout_above="@id/ll_bottom"
android:background="@color/holo_orange_light"
app:lineWidth="10dp"
app:selectedColor="#fff"
app:strokeWidth="10dp"
app:unselectedColor="#888888" />
<!-- ViewPager containing fragments with different views -->
<android.support.v4.view.ViewPager
android:id="@+id/view_pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/view_pager_indicator"
android:layout_alignParentTop="true"
android:background="@color/holo_red_light" />
</RelativeLayout>
在藍色區域你把你不喜歡的 橙色區域用於由 ViewPagerIndicator改變靜態內容最後紅色區域是ViewPager的一個。這個區域是可以滑動的。
我應該在哪裏把我的數字觀trignometric查看 –
在相對佈局的最後一個孩子也就是** ** –