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

  • 相关阅读:
    Linux 设备驱动 Edition 3(中文版)
    内核和用户空间共享内存的实现例程proc和mmap
    mmap的详细使用(用户空间)
    使用 I/O 内存from LDD3
    关于strcpy、memset、memcpy的使用详解
    get_free_page 和其友
    Linux调试技术介绍
    关于信息时代的学习
    [恢]hdu 1196
    [恢]hdu 1157
  • 原文地址:https://www.cnblogs.com/1ming/p/5409896.html
Copyright © 2011-2022 走看看