• 布局


    <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:layout_height="0dp"
            android:layout_weight="1"
            android:hint="0"
            android:gravity="bottom|right"
            android:textSize="40dp"
    
            />
        <TableRow>
            <Button
            android:layout_height="match_parent"
            android:layout_width="match_parent"
            android:layout_weight="1"
                android:textSize="40dp"
                android:text="C"/>
            <Button
                android:layout_height="match_parent"
                android:layout_width="match_parent"
                android:layout_weight="1"
                android:text="◀"
                android:textSize="40dp"
                />
            <Button
                android:layout_height="match_parent"
                android:layout_width="match_parent"
                android:layout_weight="1"
                android:text="∧"
                android:textSize="20dp"/>
            <Button
                android:layout_height="match_parent"
                android:layout_width="match_parent"
                android:layout_weight="1"
                android:text="+"
                android:textSize="40dp"/>
        </TableRow>
        <TableRow>
            <Button
                android:layout_height="match_parent"
                android:layout_width="match_parent"
                android:layout_weight="1"
                android:text="1"
                android:textSize="40dp"/>
            <Button
                android:layout_height="match_parent"
                android:layout_width="match_parent"
                android:layout_weight="1"
                android:text="2"
                android:textSize="40dp"/>
            <Button
                android:layout_height="match_parent"
                android:layout_width="match_parent"
                android:layout_weight="1"
                android:text="3"
                android:textSize="40dp"/>
            <Button
                android:layout_height="match_parent"
                android:layout_width="match_parent"
                android:layout_weight="1"
                android:text="—"
                android:textSize="40dp"/>
        </TableRow>
        <TableRow>
            <Button
                android:layout_height="match_parent"
                android:layout_width="match_parent"
                android:layout_weight="1"
                android:text="4"
                android:textSize="40dp"/>
            <Button
                android:layout_height="match_parent"
                android:layout_width="match_parent"
                android:layout_weight="1"
                android:text="5"
                android:textSize="40dp"/>
            <Button
                android:layout_height="match_parent"
                android:layout_width="match_parent"
                android:layout_weight="1"
                android:text="6"
                android:textSize="40dp"/>
            <Button
                android:layout_height="match_parent"
                android:layout_width="match_parent"
                android:layout_weight="1"
                android:text="×"
                android:textSize="40dp"/>
        </TableRow>
        <TableRow>
            <Button
                android:layout_height="match_parent"
                android:layout_width="match_parent"
                android:layout_weight="1"
                android:text="7"
                android:textSize="40dp"/>
            <Button
                android:layout_height="match_parent"
                android:layout_width="match_parent"
                android:layout_weight="1"
                android:text="8"
                android:textSize="40dp"/>
            <Button
                android:layout_height="match_parent"
                android:layout_width="match_parent"
                android:layout_weight="1"
                android:text="9"
                android:textSize="40dp"/>
            <Button
                android:layout_height="match_parent"
                android:layout_width="match_parent"
                android:layout_weight="1"
                android:text="÷"
                android:textSize="40dp"/>
        </TableRow>
        <TableRow>
    
            <Button
                android:layout_height="match_parent"
                android:layout_width="match_parent"
                android:layout_weight="1"
                android:text="0"
                android:layout_span="2"
                android:textSize="40dp"/>
            <Button
                android:layout_height="match_parent"
                android:layout_width="match_parent"
                android:layout_weight="1"
                android:text="."
                android:textSize="40dp"/>
            <Button
                android:layout_height="match_parent"
                android:layout_width="match_parent"
                android:layout_weight="1"
                android:text="="
                android:textSize="40dp"/>
        </TableRow>
    </TableLayout>

  • 相关阅读:
    js弹出框、对话框、提示框、弹窗总结
    GIT本地免密配置
    SpringMVC 框架的搭建及基本功能的实现
    win10调用局域网内xp系统上的打印机
    JSP页面之间互相传值
    Spring MVC 框架的架包分析,功能作用,优点
    hibernate_Restrictions用法
    服务器中配置多个Tomcat及内存溢出配置
    破解navicat
    如何重装mysql8及初次修改密码
  • 原文地址:https://www.cnblogs.com/storm47/p/5409908.html
Copyright © 2020-2023  润新知