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

  • 相关阅读:
    可视化百分比数据,Excel图表展示小技巧
    巧用宏录制,轻松制作Excel简易查询小系统
    Excel也能制作电子印章,你见过吗?学会了职场不求人
    ​21个Shift组合快捷键,学会了想加班都难
    Excel中关于日期时间的小知识小技巧,你还记得多少?
    自动添加单元格边框,Excel有妙招,两个技巧任意选
    [asp.net] 通过JS实现对treeview控件的复选框单选控制。
    编译器把getset访问器编译成了方法get_method()/set_method()
    sql MERGE
    动态添加特性
  • 原文地址:https://www.cnblogs.com/1ming/p/5409896.html
Copyright © 2011-2022 走看看