2016-12-21 1 views
0

CoordinatorLayout에 단편을 추가 할 수없는 것 같습니다. 삽입을 시도 할 때 충돌이 발생하지 않지만 조각이 표시되지 않지만 크기를 평가할 때 0이 아닙니다. CoordinatorLayoutRelativeLayout으로 변경하면 조각이 나옵니다. CoordinatorLayoutEditText을 추가하면 EditText이 표시됩니다. 조각이 CoordinatorLayout에 나타나지 않는 이유는 무엇입니까?CoordinatorLayout에 단편 추가

<android.support.design.widget.CoordinatorLayout  
    xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:app="http://schemas.android.com/apk/res-auto" 
    android:id="@+id/coordinator" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent"> 

    <android.support.v7.widget.RecyclerView  
     android:id="@+id/recycler" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" /> 

    <FrameLayout 
     android:id="@+id/fragment_container" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     app:layout_behavior="com.mypackage.Behavior"> 

    </FrameLayout> 
</android.support.design.widget.CoordinatorLayout> 

를 다음과 같이 내 조각으로 FrameLayout를 교체하고 : 내 경우

getChildFragmentManager() 
        .beginTransaction() 
        .replace(R.id.fragment_container, myFragment, MyFragment.TAG) 
        .commit(); 
+0

동작을 표시 할 수 있습니까? – GPack

+0

@GPack 지금은 비어 있습니다. – Zarwan

답변

0

문제가 실제로 내가 추가 한 조각보기이었다 다음과 같이

내 XML이다. 그것을 마진으로 화면에서 밀었습니다. 문제의 방법이 효과적입니다.