2014-04-09 2 views
1

wrap_content의 layout_width/layout_height의 ViewHolder 내에서 layout_width/layout_height가 match_parent로 설정된 UI 구성 요소의 동작에 대한 문서 또는 가이드 라인을 찾으려고합니다.wrap_content 레이아웃 내의 match_parent

예를 들어, 다음 레이아웃의 예상 결과는 무엇입니까? 설명 here으로

<RelativeLayout 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:background="#ffffff> 

     <LinearLayout 
      android:layout_width="match_parent" 
      android:layout_height="match_parent" 
      android:background="#000000" 
    /> 
    </RelativeLayout> 

답변

0

, 귀하의 예제의 레이아웃이있는 LinearLayout 안에 넣어 무엇에 따라 달라집니다. 이 내용은 부모 RelativeLayout 내의 사용 가능한 모든 수직 공간을 채우기 위해 확장됩니다. 디폴트에서는, LinearLayout는 부모 RelativeLayout의 좌상에 배치됩니다.

관련 문제