黑马程序员技术交流社区
标题:
今天学习了android 五种布局(不包括绝对布局)
[打印本页]
作者:
宇轩H
时间:
2017-2-3 12:35
标题:
今天学习了android 五种布局(不包括绝对布局)
<?xml version="1.0" encoding="utf-8"?>
<!-- 线性布局 -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<!-- 相对布局 -->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >
<!-- 表格布局 -->
<TableLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >
<!-- 网格布局 -->
<GridLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >
<!-- 帧布局 -->
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="helloWorld" />
</FrameLayout>
</GridLayout>
</TableLayout>
</RelativeLayout>
</LinearLayout>
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/)
黑马程序员IT技术论坛 X3.2