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>

  • 相关阅读:
    常见设备标记长度查询
    word怎么在方框中打对号
    shell dict 操作
    词表数据转换
    GoLand tool tips
    mac使用技巧
    人生三大陷阱
    【js重学系列】执行上下文
    uniapp-ui库
    【js重学系列】instanceof
  • 原文地址:https://www.cnblogs.com/beens/p/5411312.html
Copyright © 2011-2022 走看看