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

  • 相关阅读:
    ERROR com.opensymphony.xwork2.interceptor.ParametersInterceptor
    vscode中使用node服务调试,会在promise的reject出现断点报错
    koa-router匹配多个路由添加中间件函数
    react-router中的路由钩子使用
    在less中不能正常使用css3的calc属性的解决方法
    react-redux安装失败的问题
    npm脚本命令npm run script的使用
    npx的使用和理解
    babel的命令行工具babel-cli解析
    babel的.babelrc解析
  • 原文地址:https://www.cnblogs.com/1ming/p/5409896.html
Copyright © 2011-2022 走看看