<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. 夺命雷公狗---Thinkphp----11之管理员的增删改查的完善

    由于我们刚才的帐号还没通过任何的验证就可以直接进入数据库了,这当然不是不合理的交互逻辑,所以我们要修改下,让他变得3合理一些, 所以我们还是要按照套路来修改几处即可解决问题: 首先修改下添加的控制器: ...

  2. 【crunch bang】程序中文化

    在应用程序中配置使用中文显示. # apt-get install locales # dpkg-reconfigure locales 安装文泉驿-微米黑字体: sudo apt-get insta ...

  3. javascript中字符串格式json如何转化成json对象

    什么是JSON JSON(JavaScript Object Notation)是一种优美的JavaScript对象创建方法.JSON也是一种轻量级数据交换格式.JSON非常易于人阅读与编写,同时利于 ...

  4. ASP.NET MVC4中的bundles特性引发服务器拒绝访问(403错误)

    在ASP.NET MVC4中微软引入了bundles特性,这个特性可以将服务器端的多个Javascript或多个css文件捆绑在一起作为一个单一的URL地址供客户端浏览器调用,从而减少了页面上Http ...

  5. remoting方式

    1. WebService跨平台,跨防火墙,但是很抱歉,基于xml速度慢2. RMI(java)/Remoting(.net)平台相关,基于二进制序列化,速度快.3.dcom(com+)spring提 ...

  6. 三层架构与MVC的PK--ASP.NET MVC图解(一)

  7. 关于jQuery的bind()\trigger()\triggerHandler()

    1.bind() 事件绑定. 多个事件会链式累加,而不会覆盖. 即 $("div").bind("click",funtion(){alert("te ...

  8. COM编程之一 组件

    [1]组件产生的背景 一个应用程序通常是由单个二进制文件组成的. 当应用程序版本发布后一般不会发生任何变化,对于操作系统.硬件以及客户需求的改变都必须要等到修复源代码后且整个应用程序被重新编译才可处理 ...

  9. ch1:python3 查看版本号、安装目录和工作空间目录

    查看python版本: 每次打开python顶端会显示版本号 在程序中判断版本号可以通过import sys  sys.version 在dos下可以通过python -V查看 安装目录:C:\Pyt ...

  10. [转]vs2008安装失败的总结与分享

    转自:http://www.cnblogs.com/rockdean/archive/2010/01/13/1646851.html 今天系统是刚装的,今儿个也不是第一次装系统,也不是第一次装vs20 ...