• 四则运算安卓版ver.mk2


    做了一点微小的变动....非常微小...不过美观点了就是...那就是----加背景!

    变更后的部分代码:

      1 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      2     android:layout_width="fill_parent"
      3     android:layout_height="fill_parent"
      4     android:orientation="vertical"
      5     android:background="@drawable/a1" >
      6 
      7     <EditText
      8         android:id="@+id/result"
      9         android:layout_width="match_parent"
     10         android:layout_height="wrap_content"
     11         android:cursorVisible="false"
     12         android:digits="1234567890."
     13         android:ems="10"
     14         android:focusable="false"
     15         android:numeric="decimal"
     16         android:singleLine="true" />
     17 
     18     <TableLayout
     19         android:layout_width="fill_parent"
     20         android:layout_height="wrap_content"
     21         android:stretchColumns="0,1,2,3" >
     22 
     23         <TableRow>
     24 
     25             <Button
     26                 android:id="@+id/btn_1"
     27                 android:text="7" />
     28 
     29             <Button
     30                 android:id="@+id/btn_2"
     31                 android:text="8" />
     32 
     33             <Button
     34                 android:id="@+id/btn_3"
     35                 android:text="9" />
     36         </TableRow>
     37 
     38         <TableRow>
     39 
     40             <Button
     41                 android:id="@+id/btn_4"
     42                 android:text="4" />
     43 
     44             <Button
     45                 android:id="@+id/btn_5"
     46                 android:text="5" />
     47 
     48             <Button
     49                 android:id="@+id/btn_6"
     50                 android:text="6" />
     51         </TableRow>
     52 
     53         <TableRow>
     54 
     55             <Button
     56                 android:id="@+id/btn_7"
     57                 android:text="1" />
     58 
     59             <Button
     60                 android:id="@+id/btn_8"
     61                 android:text="2" />
     62 
     63             <Button
     64                 android:id="@+id/btn_9"
     65                 android:text="3" />
     66         </TableRow>
     67 
     68         <TableRow>
     69 
     70             <Button
     71                 android:id="@+id/btn_dot"
     72                 android:text="." />
     73 
     74             <Button
     75                 android:id="@+id/btn_0"
     76                 android:text="0" />
     77 
     78             <Button
     79                 android:id="@+id/btn_eq"
     80                 android:text="确定" />
     81         </TableRow>
     82     </TableLayout>
     83 
     84     <Button
     85         android:id="@+id/btn_clear"
     86         android:layout_width="fill_parent"
     87         android:layout_height="wrap_content"
     88         android:text="清除" />
     89 
     90     <EditText
     91         android:id="@+id/xs"
     92         android:layout_width="wrap_content"
     93         android:layout_height="wrap_content"
     94         android:focusable="false"
     95         android:text="欢迎使用四则运算程序!" >
     96 
     97         <requestFocus />
     98     </EditText>
     99 
    100     <Button
    101         android:id="@+id/start"
    102         android:layout_width="wrap_content"
    103         android:layout_height="wrap_content"
    104         android:text="开始" />
    105 
    106 </LinearLayout>
    fragment_main

    顺便附上用户使用图!

  • 相关阅读:
    v-show和v-if隐藏的区别(备份前端网)
    正则表达式别人好点的解析(备份前端网)
    【干货】vue2.0-模块化全局自定义过滤器和vue中export和export default用法(前端网备份)
    【干货】原生js做的一维数组对象,二维数组对象的模糊查询(前端网备份)
    JavaWeb学习笔记(六)—— Cookie&Session
    JavaWeb学习笔记(五)—— request
    JavaWeb学习笔记(四)—— response
    JavaWeb学习笔记(三)—— Servlet
    JavaWeb学习笔记(二)—— Tomcat服务器
    JavaWeb学习笔记(一)—— Http协议
  • 原文地址:https://www.cnblogs.com/SiPine/p/4544677.html
Copyright © 2020-2023  润新知