2014-06-22 5 views
0

세 개의 조각으로 된 CirclePageIndicator가 있습니다. 내가 원하는 것은 동일한 머리글과 바닥 글을 모든 조각에 포함시키는 것입니다. 사용자가 조각을 문지르면 머리글과 바닥 글을보고 항상 액세스 할 수 있어야합니다. 해결책을 찾았으며 this way을 시도했지만이 방법으로 원이 사라지거나 사라졌습니다. 나는 많은 시간을 보냈지 만 해결할 수 없었다.CirclePageIndicator에 머리말과 꼬리말을 삽입하는 방법은 무엇입니까?

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent" 
android:orientation="vertical" > 
<android.support.v4.view.ViewPager 
    android:id="@+id/viewpager" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:layout_weight="1" > 

    <RelativeLayout 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
     android:layout_above = "@+id/footer" 
     android:layout_below = "@+id/header" > 

     <com.viewpagerindicator.CirclePageIndicator 
      android:id="@+id/indicator" 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" /> 
    </RelativeLayout> 

    <!-- Footer aligned to bottom --> 

    <RelativeLayout 
     android:id="@+id/footer" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:layout_alignParentBottom="true" 
     android:background="#FC0" 
     android:gravity="center" > 

     <TextView 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:layout_margin="5dp" 
      android:text="Fixed Footer" 
      android:textColor="#000" 
      android:textSize="20sp" /> 
    </RelativeLayout> 
</android.support.v4.view.ViewPager> 

내가 잘못 뭐하는 거지 : 이것은 내가 링크에 따라 삽입을 시도하는 방법을 내 XML 레이아웃입니까?

답변

0

단지 viewpager 위에 원형 표시를 넣어 .. .. 또는 그들이 함께 호출기 와이프 것이다

<relative layout> 
<circular indicator /> 
<viewpager ><--- ----> 
</relative layout> 
관련 문제