2013-01-10 2 views
0

내 레이아웃을 배치하는 데 문제가 있습니다. "buttonsLayout"을 뷰 아래쪽에 고정시키고 싶습니다. 문제는 없지만 "buttonsLayout"은 "호출기"를 오버레이합니다. "buttonsLayout"이 시작되는 "호출기"가 중지되기를 원합니다.안드로이드 -보기 하단의 레이아웃과 오버레이하지 않습니다.

나는 많은 게시물을 읽었지만 아무런 도움이되지 않습니다. 뭐가 잘못 되었 니 ?

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:id="@+id/rootLayout" 
android:layout_width="match_parent" 
android:layout_height="match_parent" > 

<android.support.v4.view.ViewPager 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    android:id="@+id/pager" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:layout_alignParentTop="true" 
    android:background="@color/gray" > 
</android.support.v4.view.ViewPager> 

<RelativeLayout 
    android:id="@+id/buttonsLayout" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:layout_alignParentBottom="true" 
    android:orientation="horizontal" > 

    <Button 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_alignParentLeft="true" 
     android:text="Left" /> 

    <Button 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_alignParentRight="true" 
     android:text="Right" /> 
</RelativeLayout> 

</RelativeLayout> 

답변

4

페이저 레이아웃에 android : layout_above = "@ + id/buttonsLayout"을 추가하십시오. 따라서 호출기는 버튼을 오버레이하지 않습니다.

P. 나는 당신의 xml에 하나 더 닫기 RelativeLayout 태그를 볼 수 없습니다 ...

관련 문제