zoukankan      html  css  js  c++  java
  • 计算器

    <?xml version="1.0" encoding="utf-8"?>
    <TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_row="6"
        android:stretchColumns="1"
        >
        <EditText android:layout_width="match_parent"
            android:hint="0"
            android:gravity="bottom|right"
            android:editable="true"
            android:layout_weight="1"/>
        <TableRow>
        <Button android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:text="C"
            android:layout_weight="1"/>
        <Button android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:text="Del"
            android:layout_weight="1"/>
        <Button android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:text="÷"
            android:layout_weight="1"/>
        <Button android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:text="X"
            android:layout_weight="1"/>
    </TableRow>
        <TableRow>
            <Button android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:text="7"
                android:layout_weight="1"/>
            <Button android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:text="8"
                android:layout_weight="1"/>
            <Button android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:text="9"
                android:layout_weight="1"/>
            <Button android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:text="-"
                android:layout_weight="1"/>
        </TableRow>
        <TableRow>
            <Button android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:text="4"
                android:layout_weight="1"/>
            <Button android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:text="5"
                android:layout_weight="1"/>
            <Button android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:text="6"
                android:layout_weight="1"/>
            <Button android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:text="+"
                android:layout_weight="1"/>
        </TableRow>
        <TableRow>
            <Button android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:text="1"
                android:layout_weight="1"/>
            <Button android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:text="2"
                android:layout_weight="1"/>
            <Button android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:text="3"
                android:layout_weight="1"/>
            <Button android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:text="="
                android:layout_weight="1"
                android:background="#F03"/>
        </TableRow>
        <TableRow>
    
            <Button android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:text="*"
                android:layout_weight="1"/>
            <Button android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:text="0"
                android:layout_weight="1"/>
            <Button android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:text="."
                android:layout_weight="1"/>
            <Button android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:text="#"
                android:layout_weight="1"
                />
        </TableRow>
    </TableLayout>
    View Code

  • 相关阅读:
    [转]使用Composer管理PHP依赖关系
    Php环境下载(PHPNow)安装
    精美的 ( Android, iPhone, iPad ) 手机界面设计素材和线框图设计工具
    八款强大的jQuery图片滑块动画插件
    JavaScript prototype.js提升JavaScript开发效率
    JS Message 网页消息提醒
    Vis.js图表插件
    动态算法学习
    GPS功能:百度路书自定义【轨迹回放】
    CSS美化页面滚动条
  • 原文地址:https://www.cnblogs.com/1ming/p/5409896.html
Copyright © 2011-2022 走看看