2016-09-21 2 views
1

여기 고정 된 꼬리말을위한 레이아웃입니다. RecyclerView을 함유하는 FragmentFrameLayout에 붙어있다. 그러나 RecyclerView의 내용은 바닥 글 레이아웃에 의해 겹쳐지고 있습니다.안드로이드 레이아웃의 고정 꼬리말

<RelativeLayout 
android:layout_height="match_parent" 
android:layout_width="match_parent" 
android:orientation="vertical"> 

<FrameLayout 
    android:id="@+id/home_parent_framelayout" 
    android:layout_height="wrap_content" 
    android:layout_width="match_parent" 
    app:layout_behavior="@string/appbar_scrolling_view_behavior" /> 

<LinearLayout 
    android:id="@+id/footer_linearlayout" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:orientation="horizontal" 
    android:background="#f1c21e" 
    android:layout_alignParentBottom="true"> 

    <footer layout> 

    </LinearLayout> 

</RelativeLayout> 

답변

1

당신의 FrameLayout에서 제공 재산

android:layout_above="@+id/footer_linearlayout" 

그것이 FrameLayoutFooter 모두 표시됩니다.

이 방법을 추가

<FrameLayout 
    android:id="@+id/home_parent_framelayout" 
    android:layout_height="wrap_content" 
    android:layout_width="match_parent" 
    app:layout_behavior="@string/appbar_scrolling_view_behavior" 
    android:layout_above="@+id/footer_linearlayout" /> 

설명 :

당신이 수정 바닥 글을 당신의 높이에 layout_above 속성을 제공해야 Layout 부모의 자식을 만들 때마다 LinearLayoutBottom를 표시하지 않습니다 바닥 글 수정은 귀하의 경우에 LinearLayout을 의미합니다. layout_above = "@ + ID가/footer_linearlayout"는 FrameLayout이 레이아웃이 바닥 글 위에 표시됩니다 : 높이가 너무

+0

FrameLayout이 내가 안드로이드를 추가 할 때 그렇게 랩 내용으로 높이가 .. 당신이 FrameLayout 부모 자식이 android:layout_above="@+id/linearLayout을주는 화면에서 LinearLayout을 표시합니다 하지만 그것 위에는 많은 빈 공간 (framelayout)이 있기 때문에 높이 포장 내용이 있습니다. –

+0

그러면'FrameLayout' 높이를'match_parent'에 주면'FrameLayout' 높이가됩니다. 그것은 당신의 문제를 해결할 것입니다 .. – Ironman

+0

@Androidjack 당신이 그것을 해결 했습니까? – Ironman

1

이 시도 :

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

    <FrameLayout 
     android:id="@+id/home_parent_framelayout" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     app:layout_behavior="@string/appbar_scrolling_view_behavior" 
     android:layout_above="@+id/footer_linearlayout" /> 

    <LinearLayout 
     android:id="@+id/footer_linearlayout" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:layout_alignParentBottom="true" 
     android:background="#f1c21e" 
     android:orientation="horizontal"> 

//Your footer layout 
    </LinearLayout> 

</RelativeLayout> 
관련 문제