<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. 夺命雷公狗---DEDECMS----3快速入门之隐藏

    如果我们在工作的时候遇到上操蛋的老板,本来公司是做医疗器械的,但是老板突然老了句我们不做医疗了,我们该做电影网,那么我们可以先将原本的栏目进行修改成隐藏栏目, 主要是预防变态老板突然来句“电影网更不好 ...

  2. [php] 使用IDE的正则搜索代码

    ([^a-zA-Z_=$0-9/\[\>])('|"|,)?(\s*)store_banner(\s*)('|"|,)?([^a-zA-Z_=$0-9\/\(\]:]) 用在 ...

  3. [记录]firefox繁体转换成简体的油猴脚本

    // ==UserScript== // @name 繁简转换 // @include *.* // @author yecao // @version 0.1 // @include * // @e ...

  4. 【RoR win32】新rails运行后0.0.0.0:3000不能访问

    在浏览器中使用127.0.0.1:3000来访问

  5. 使用sublime text3的一些事

    因为在第一次接触网页设计的时候,使用的是Dreamweaver,它的设计是一款所见即所得的网页编辑器,而且当你写好元素之后的“:”时,就会有代码提示功能,对一些初学者来说,是一个不错的选择.但是慢慢地 ...

  6. 在IIS站点中Adomd.net集成认证账号问题

    最近在做一个Asp.net项目的时候 ,在C#代码里面用到了Adomd.net去连接SSAS服务器做MDX查询,开发完成后将Asp.net代码部署到IIS后发现Adomd.net老是连接不到SSAS服 ...

  7. 函数后面加throw关键字

    [1]为什么函数后面加throw关键字? C++函数后面加关键字throw(something)限制,是对这个函数的异常安全性作出限制. 举例及解释如下: void fun() throw() 表示f ...

  8. django migrate10060 Duplicate column name错误

    这个错误意思是有重复的列名,其实大部分原因是因为某些列被执行了多次,可以打开migration里面的django生成的文件去排查错误,然后自己手动修改数据库还原,实在不行可以把除了0001和init文 ...

  9. fprintf 读入%s,要注意

    eg  文件内容faninfd 14   "%s %d",会把整行内容放到%s 而%d是乱码 ps: 文件内容是 1,2,3    “%d,%d,%d” 文件内容是1:2:3   ...

  10. PANIC : Error configuring AvalonLogSystem :

    ll /tpsys/weblogic/user_projects/domains/mall/velocity.log 有1.7版本的的,不用这个1.4的.1.4会有这个问题: PANIC : Erro ...