2014-04-09 54 views
1

我試圖找到關於在layout_width/layout_height的wrap_content的ViewHolder中將layout_width/layout_height設置爲match_parent的UI組件的行爲的文檔或準則。wrap_content佈局內的match_parent

因此,例如,以下佈局的預期結果是什麼?

<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

通過描述here,你的榜樣的佈局將取決於你把什麼的LinearLayout內。該內容將擴展以填充父親RelativeLayout中的所有可用垂直空間。默認情況下,LinearLayout將位於父親RelativeLayout的左上角

相關問題