<GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/GridLayout1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:rowCount="6"
android:columnCount="4"
android:orientation="horizontal"> <TextView
android:layout_width="match_parent"
android:layout_height="230dp"
android:layout_columnSpan="4"
android:text="0"
android:textSize="50sp"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp" /> <Button
android:layout_width="100dp"
android:layout_height="70dp"
android:text="+"
android:textSize="40dp"
android:background="#918"
android:textColor="#FF4"
/> <Button
android:layout_width="100dp"
android:layout_height="70dp"
android:text="1"
android:textSize="40dp"
android:background="#999"
/>
<Button
android:layout_width="100dp"
android:layout_height="70dp"
android:text="2"
android:textSize="40dp"
android:background="#999"
/>
<Button
android:layout_width="100dp"
android:layout_height="70dp"
android:text="3"
android:textSize="40dp"
android:background="#999"
/>
<Button
android:layout_width="100dp"
android:layout_height="70dp"
android:text="-"
android:textSize="40dp"
android:background="#918"
android:textColor="#FF4"
/>
<Button
android:layout_width="100dp"
android:layout_height="70dp"
android:text="4"
android:textSize="40dp"
android:background="#999"
/>
<Button
android:layout_width="100dp"
android:layout_height="70dp"
android:text="5"
android:textSize="40dp"
android:background="#999"
/>
<Button
android:layout_width="100dp"
android:layout_height="70dp"
android:text="6"
android:textSize="40dp"
android:background="#999"
/>
<Button
android:layout_width="100dp"
android:layout_height="70dp"
android:text="*"
android:textSize="40dp"
android:background="#918"
android:textColor="#FF4"
/>
<Button
android:layout_width="100dp"
android:layout_height="70dp"
android:text="7"
android:textSize="40dp"
android:background="#999"
/>
<Button
android:layout_width="100dp"
android:layout_height="70dp"
android:text="8"
android:textSize="40dp"
android:background="#999"
/>
<Button
android:layout_width="100dp"
android:layout_height="70dp"
android:text="9"
android:textSize="40dp"
android:background="#999"
/>
<Button
android:layout_width="100dp"
android:layout_height="70dp"
android:text="/"
android:textSize="40dp"
android:background="#918"
android:textColor="#FF4"
/>
<Button
android:layout_width="100dp"
android:layout_height="70dp"
android:text="."
android:textSize="40dp"
android:background="#918"
android:textColor="#FF4"
/>
<Button
android:layout_width="100dp"
android:layout_height="70dp"
android:text="0"
android:textSize="40dp"
android:background="#999"
/>
<Button
android:layout_width="100dp"
android:layout_height="70dp"
android:text="="
android:textSize="40dp"
android:background="#918"
android:textColor="#FF4"
/>
</GridLayout>

Android 网格布局 计算器的更多相关文章

  1. Android——网格布局仿计算器

    代码如下: <?xml version="1.0" encoding="utf-8"?> <GridLayout xmlns:android= ...

  2. Android 网格布局短信发送界面

    <?xml version="1.0" encoding="utf-8"?> <GridLayout xmlns:android=" ...

  3. Android 线性布局 计算器

    <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android=&quo ...

  4. android的布局-----GridLayout(网格布局)

    学习导图 (一)简介 网格布局由GridLayout所代表,在android4.0之后新增加的布局管理器,因此需要android4.0之后的版本中使用,如果在更早的平台使用该布局管理器,则需要导入相应 ...

  5. Android中帧布局-FrameLayout和网格布局-GridLayout

    帧布局-FrameLayout 一.概念 帧布局中,容器为每个加入其中的空间创建一个空白的区域(成为一帧).每个空间占据一帧,这些帧会按gravity属性自动对齐. 帧布局的效果是将其中的所有空间叠加 ...

  6. android——学习:网格布局——GridLayout

    Android一开始就提供了几种布局控件,如线性布局LinearLayout.相对布局RelativeLayout和表格布局TableLayout等,但在很多情况下,这些布局控件是不能满足要求的,因此 ...

  7. Android布局_网格布局GirdLayout

    自Android4.0版本后新增的GirdLayout网格布局(API 14) <?xml version="1.0" encoding="utf-8"? ...

  8. Android精通:TableLayout布局,GridLayout网格布局,FrameLayout帧布局,AbsoluteLayout绝对布局,RelativeLayout相对布局

    在Android中提供了几个常用布局: LinearLayout线性布局 RelativeLayout相对布局 FrameLayout帧布局 AbsoluteLayout绝对布局 TableLayou ...

  9. Android开发---网格布局案例

     Android开发---网格布局案例 效果图: 1.MainActivity.java package com.example.android_activity; import android.ap ...

随机推荐

  1. php里session的用法

    PHP中的session默认情况下是使用客户端的Cookie.当客户端的Cookie被禁用时,会自动通过Query_String来传递. Php处理会话的函数一共有11个,我们详细介绍一下将要用到几个 ...

  2. 关于MyEcplise中常见的问题和解决方案

    1.问题:严重   The web application  created a ThreadLocal with key of type  and a value of type  but fail ...

  3. 鸟哥的Linux私房菜之学习shell script

    运行程序的时候一般都是创建一个子程序来执行,所以子程序中的变量什么的在当前的shell下没法使用,但是如果使用source来执行就可以在当前shell下执行程序 shift 1 去掉第一个参数,后面接 ...

  4. divcss5布局

    一.ie9不支持line-height字体垂直居中兼容问题    原因:CSS中使用了中文字体,而中文字体使用汉字.如:font-family:"微软雅黑"   1.将中文字体汉字 ...

  5. Linux设备驱动工程师之路——内核链表的使用【转】

    本文转载自:http://blog.csdn.net/forever_key/article/details/6798685 Linux设备驱动工程师之路——内核链表的使用 K-Style 转载请注明 ...

  6. 转:redis常用命令

    一 Redis介绍 Redis是一个开源的使用ANSI C语言编写.支持网络.可基于内存亦可持久化的日志型.Key-Value数据库,并提供多种语言的API.从2010年3月15日起,Redis的开发 ...

  7. 修改ECSHOP后台的商品列表里显示该商品品牌

    如何在在ECSHOP后台的商品列表中也显示商品的品牌”.下面就来最模板讲一下如何来修改.此方法只保证在ECSHOP2.7.2版本下有效,其他版本请参照修改. 第一步:首先我们来打开程序文件: /adm ...

  8. Greenplum failed segment的恢复方法

    [前记] Segment检测及故障切换机制GP Master首先会检测Primary状态,如果Primary不可连通,那么将会检测Mirror状态,Primary/Mirror状态总共有4种:1. P ...

  9. hdwiki model目录下的函数类

    model目录下的函数类    actions.class.php(站内地图相关) getHTML:获得页面菜单和相关信息 getMap:生成站内地图 adv.class.php 对wiki_adve ...

  10. jquery函数和javascript函数的区别

    一.窗口加载:http://www.w3school.com.cn/js/js_library_jquery.asp 在 JavaScript 中,您可以分配一个函数以处理窗口加载事件: JavaSc ...