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

  • 相关阅读:
    解决SQL Server Compact 无法在64位系统下正常运行
    Mvc5+Entity Framework6 之二----在MVC中用Entity Framework实现基本的CRUD
    Asp.net MVC5中Html.DropDownList的使用
    C# 使用微软的Visual Studio International Pack 类库提取汉字拼音首字母
    MVC学习 (二) Razor语法
    MVC学习 (一)
    编程实现机器人相遇
    jquery优化引发的思考
    (续)检测到有潜在危险的 Request.Form 值
    检测到有潜在危险的 Request.Form 值
  • 原文地址:https://www.cnblogs.com/1ming/p/5409896.html
Copyright © 2011-2022 走看看