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">
        <TextView
            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="match_parent"
            android:text="C"
            android:layout_weight="1"
            />
        <Button
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:text="←"
            android:layout_weight="1"
            />
        <Button
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:text="÷"
            android:layout_weight="1"
            />
        <Button
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:text="×"
            android:layout_weight="1"
            />
    </TableRow>
        <TableRow>
            <Button
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:text="7"
                android:layout_weight="1"
                />
            <Button
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:text="8"
                android:layout_weight="1"
                />
            <Button
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:text="9"
                android:layout_weight="1"
                />
            <Button
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:text="-"
                android:layout_weight="1"
                />
        </TableRow>
        <TableRow>
            <Button
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:text="4"
                android:layout_weight="1"
                />
            <Button
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:text="5"
                android:layout_weight="1"
                />
            <Button
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:text="6"
                android:layout_weight="1"
                />
            <Button
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:text="+"
                android:layout_weight="1"
                />
        </TableRow>
        <TableRow>
            <Button
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:text="1"
                android:layout_weight="1"
                />
            <Button
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:text="2"
                android:layout_weight="1"
                />
            <Button
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:text="3"
                android:layout_weight="1"
                />
            <Button
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:text="="
                android:layout_weight="1"
                />
        </TableRow>
        <TableRow>
            <Button
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:text="*"
                android:layout_weight="1"
                />
            <Button
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:text="0"
                android:layout_weight="1"
                />
            <Button
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:text="."
                android:layout_weight="1"
                />
            <Button
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:text="#"
                android:layout_weight="1"
                />
        </TableRow>
    
    </TableLayout>

  • 相关阅读:
    hdu 3714 Error Curves(三分)
    hdu 4717 The Moving Points(第一个三分题)
    hdu 4722 Good Numbers(规律题)
    分布式平台基础算法浅析
    Linux下通过管道杀死所有与tomcat相关的进程
    实习番外篇:解决C语言使用Makefile无法实现更好的持续集成问题
    SHELL脚本之awk妙用
    如何在CentOS7上安装Python3及对应问题
    欧拉定理和费马小定理
    最大公约和最小公倍数
  • 原文地址:https://www.cnblogs.com/beens/p/5411312.html
Copyright © 2011-2022 走看看