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>

  • 相关阅读:
    Androi“.NET研究”d 源代码结构 狼人:
    Android UI“.NET研究”之困 横跨四个屏幕的战争 狼人:
    Win7 配“.NET研究”置Android开发环境 狼人:
    微“.NET研究”软“重启”Windows Phone 7 设计的经过 狼人:
    iOS开发库的族“.NET研究”谱介绍 狼人:
    文件匹配常用Linux命令小结
    functionclassAS sin函数小球运动
    持久化框架数据持久化框架(JPA)及其具体实现
    系统工程师Python工程师基础班
    设置虚拟机虚拟机中fedora上网配置bridge连接方式(图解)
  • 原文地址:https://www.cnblogs.com/beens/p/5411312.html
Copyright © 2011-2022 走看看