首页 > 其他 > 详细

成长之路(一) GridLayout 布局

时间:2017-07-25 09:27:55      阅读:210      评论:0      收藏:0      [点我收藏+]

    效果图

技术分享

  代码区

 

<?xml version="1.0" encoding="utf-8"?>
<GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:columnCount="4"
android:orientation="horizontal"
android:rowCount="2"

>


<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="1"/>


<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="2"/>

<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="3"/>


<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="4"
android:layout_rowSpan="2"
android:layout_gravity="fill"/>

<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_columnSpan="2"
android:text="5"
android:layout_gravity="fill_horizontal"
/>


<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="6"/>
<android.support.v4.widget.Space />
</GridLayout>

成长之路(一) GridLayout 布局

原文:http://www.cnblogs.com/-8523/p/7231906.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!