match_parent的使用
时间:2014-11-08 10:20:38
收藏:0
阅读:119
如果一个控件的宽、高使用match_parent属性,表示该控件的宽、高占剩下的所有区域。
例:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <Button android:id="@+id/login_btn" android:text="Login" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_margin="5dip" /> <WebView android:id="@+id/login_webview" android:layout_width="fill_parent" android:layout_height="match_parent" android:layout_margin="5dip" /> </LinearLayout>
效果:
原文:http://www.cnblogs.com/achsnw/p/4082752.html
评论(0)