2014-07-06 1 views
0

저는 TabePageIndicator를 사용하고 있으며 기본적으로 탭은 상단에 정렬되어 있습니다. 그러나 내 응용 프로그램에서는보기 호출기의 맨 아래에 배치해야합니다. 다음 코드로 시도했지만, 탭은 아래쪽에 정렬되어 있지만 선은 여전히 ​​아래쪽에 표시됩니다. 가능한 해결책을 제공해주십시오. 감사!안드로이드 탭 페이지 인디케이터 상단에 라인 lindicator가있는 뷰 페이지의 하단 위치

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:app="http://schemas.android.com/apk/res-auto" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:background="@color/white" 
    android:orientation="vertical" > 

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

    <com.viewpagerindicator.TabPageIndicator 
     android:id="@+id/indicator" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     app:linePosition="top" /> 

</LinearLayout> 

예상 결과 :

enter image description here

답변

0

당신은 효과를 달성하기 위해 음의 여백을 사용하지만,있는 LinearLayout를 들어, 아래의 요소는 이전 요소의 상단에 레이어 것이라는 점을 인식 할 수있다.

관련 문제