2014-04-09 43 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的左上角

相关问题