OneZero第二周第二次站立会议(2016.3.29)

会议时间:2016年3月29日  13:05~13:16

会议成员:冉华,张敏,王巍,夏一鸣。

会议目的:汇报前一天工作,全体成员评论,确定会后修改内容或分配下一步任务。

会议内容:以下是会议插图

1.录入界面已经绘制完毕,由张、夏负责。如下图

activity代码如下

  1 package com.onezero.account;
  2 
  3 import android.app.Activity;
  4 import android.content.Intent;
  5 
  6 import java.text.SimpleDateFormat;
  7 import java.util.Date;
  8 
  9 import android.os.Bundle;
 10 import android.preference.EditTextPreference;
 11 import android.util.Log;
 12 import android.view.Menu;
 13 import android.view.MenuItem;
 14 import android.view.View;
 15 import android.widget.Button;
 16 import android.widget.EditText;
 17 import android.widget.ImageButton;
 18 import android.widget.TextView;
 19 import android.widget.Toast;
 20 
 21 public class add extends Activity {
 22 
 23     @Override
 24     protected void onCreate(Bundle savedInstanceState) {
 25         super.onCreate(savedInstanceState);
 26         setContentView(R.layout.add_main);
 27         // 显示当前时间
 28         SimpleDateFormat formatter = new SimpleDateFormat(
 29                 "yyyy年MM月dd日    HH:mm:ss     ");
 30         Date curDate = new Date(System.currentTimeMillis());// 获取当前时间
 31         String str = formatter.format(curDate);
 32 
 33         TextView mTime = (TextView) findViewById(R.id.mytime);
 34         mTime.setText(str);
 35 
 36         // 实现事件类型选择,点击并改变显示。
 37         final TextView accounttype = (TextView) findViewById(R.id.accounttype);
 38         // 一般
 39         Button button1 = (Button) findViewById(R.id.button1);
 40         button1.setOnClickListener(new Button.OnClickListener() {
 41             public void onClick(View v) {
 42                 Button button1 = (Button) findViewById(R.id.button1);
 43                 accounttype.setText(button1.getText());
 44 
 45             }
 46         });
 47         // 餐饮
 48         Button button2 = (Button) findViewById(R.id.button2);
 49         button2.setOnClickListener(new Button.OnClickListener() {
 50             public void onClick(View v) {
 51                 Button button2 = (Button) findViewById(R.id.button2);
 52                 accounttype.setText(button2.getText());
 53 
 54             }
 55         });
 56 
 57         // 购物
 58         Button button3 = (Button) findViewById(R.id.button3);
 59         button3.setOnClickListener(new Button.OnClickListener() {
 60             public void onClick(View v) {
 61                 Button button3 = (Button) findViewById(R.id.button3);
 62                 accounttype.setText(button3.getText());
 63 
 64             }
 65         });
 66         // 交通
 67         Button button4 = (Button) findViewById(R.id.button4);
 68         button4.setOnClickListener(new Button.OnClickListener() {
 69             public void onClick(View v) {
 70                 Button button4 = (Button) findViewById(R.id.button4);
 71                 accounttype.setText(button4.getText());
 72 
 73             }
 74         });
 75         // 娱乐
 76         Button button5 = (Button) findViewById(R.id.button5);
 77         button5.setOnClickListener(new Button.OnClickListener() {
 78             public void onClick(View v) {
 79                 Button button5 = (Button) findViewById(R.id.button5);
 80                 accounttype.setText(button5.getText());
 81 
 82             }
 83         });
 84 
 85         // 医疗
 86         Button button6 = (Button) findViewById(R.id.button6);
 87         button6.setOnClickListener(new Button.OnClickListener() {
 88             public void onClick(View v) {
 89                 Button button6 = (Button) findViewById(R.id.button6);
 90                 accounttype.setText(button6.getText());
 91 
 92             }
 93         });
 94 
 95         Button button7 = (Button) findViewById(R.id.button7);
 96         button7.setOnClickListener(new Button.OnClickListener() {
 97             public void onClick(View v) {
 98                 OK();
 99 
100             }
101         });
102 
103     }
104 
105     public boolean onCreateOptionsMenu(Menu menu) {
106         // Inflate the menu; this adds items to the action bar if it is present.
107         getMenuInflater().inflate(R.menu.add, menu);
108         return true;
109     }
110 
111     @Override
112     public boolean onOptionsItemSelected(MenuItem item) {
113         // Handle action bar item clicks here. The action bar will
114         // automatically handle clicks on the Home/Up button, so long
115         // as you specify a parent activity in AndroidManifest.xml.
116         
117         // 获取“录入”的返回键,并执行返回。
118         int id = item.getItemId();
119         if (id == R.id.action_add_back) {
120 
121             onBackPressed();
122         }
123 
124         return super.onOptionsItemSelected(item);
125     }
126 
127     // OK按钮
128     public void OK() {
129 
130         TextView mytime = (TextView) findViewById(R.id.mytime);
131         String text1 = mytime.getText().toString();
132 
133         TextView accounttype = (TextView) findViewById(R.id.accounttype);
134         String text2 = accounttype.getText().toString();
135 
136         EditText editText1 = (EditText) findViewById(R.id.editText1);
137         String text3 = editText1.getText().toString();
138 
139         EditText editText2 = (EditText) findViewById(R.id.editText2);
140         String text4 = editText2.getText().toString();
141 
142         String sFinal = text2 + text1 + text3 + text4;
143 
144         Log.e("!!!!!!!!!!", sFinal);
145         
146         onBackPressed();
147 
148     }
149 
150 }
Activity Code

XML代码如下

  1 <?xml version="1.0" encoding="utf-8"?>
  2 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3     xmlns:tools="http://schemas.android.com/tools"
  4     android:layout_width="match_parent"
  5     android:layout_height="match_parent"
  6     android:paddingBottom="@dimen/activity_vertical_margin"
  7     android:paddingLeft="@dimen/activity_horizontal_margin"
  8     android:paddingRight="@dimen/activity_horizontal_margin"
  9     android:paddingTop="@dimen/activity_vertical_margin"
 10     tools:context="com.onezero.account.add" >
 11 
 12     <TextView
 13         android:id="@+id/mytime"
 14         android:layout_width="240dp"
 15         android:layout_height="35dp"
 16         android:gravity="top"
 17         android:textColor="@android:color/black"
 18         android:textSize="16sp" />
 19 
 20     <TextView
 21         android:id="@+id/mytype"
 22         android:layout_width="40dp"
 23         android:layout_height="35dp"
 24         android:layout_alignBaseline="@+id/mytype"
 25         android:layout_alignBottom="@+id/mytype"
 26         android:layout_alignParentRight="true"
 27         android:gravity="top"
 28         android:text="支出"
 29         android:textColor="@android:color/black"
 30         android:textSize="16sp" />
 31 
 32     <TextView
 33         android:id="@+id/accounttype"
 34         android:layout_width="50dp"
 35         android:layout_height="35dp"
 36         android:layout_alignLeft="@+id/mytime"
 37         android:layout_below="@+id/mytime"
 38         android:layout_marginTop="46dp"
 39         android:gravity="top"
 40         android:text="一般"
 41         android:textColor="@android:color/black"
 42         android:textSize="20sp" />
 43 
 44     <TextView
 45         android:id="@+id/RMB"
 46         android:layout_width="55dp"
 47         android:layout_height="35dp"
 48         android:layout_alignBaseline="@+id/accounttype"
 49         android:layout_alignBottom="@+id/accounttype"
 50         android:layout_marginLeft="30dp"
 51         android:layout_toRightOf="@+id/accounttype"
 52         android:gravity="top"
 53         android:text="RMB"
 54         android:textColor="@android:color/black"
 55         android:textSize="20sp" />
 56 
 57     <EditText
 58         android:id="@+id/editText1"
 59         android:layout_width="150dp"
 60         android:layout_height="40dp"
 61         android:layout_alignBaseline="@+id/RMB"
 62         android:layout_alignBottom="@+id/RMB"
 63         android:layout_alignRight="@+id/mytype"
 64         android:layout_marginRight="14dp"
 65         android:ems="10"
 66         android:gravity="center"
 67         android:hint="输入金额"
 68         android:inputType="numberDecimal" >
 69 
 70         <requestFocus />
 71     </EditText>
 72 
 73     <Button
 74         android:id="@+id/button1"
 75         android:layout_width="wrap_content"
 76         android:layout_height="wrap_content"
 77         android:layout_alignLeft="@+id/accounttype"
 78         android:layout_below="@+id/accounttype"
 79         android:layout_marginTop="40dp"
 80         android:text="一般" />
 81 
 82     <Button
 83         android:id="@+id/button3"
 84         android:layout_width="wrap_content"
 85         android:layout_height="wrap_content"
 86         android:layout_alignBottom="@+id/button2"
 87         android:layout_alignRight="@+id/mytype"
 88         android:text="购物" />
 89 
 90     <Button
 91         android:id="@+id/button2"
 92         android:layout_width="wrap_content"
 93         android:layout_height="wrap_content"
 94         android:layout_alignBaseline="@+id/button1"
 95         android:layout_alignBottom="@+id/button1"
 96         android:layout_centerHorizontal="true"
 97         android:text="餐饮" />
 98 
 99     <Button
100         android:id="@+id/button5"
101         android:layout_width="wrap_content"
102         android:layout_height="wrap_content"
103         android:layout_alignLeft="@+id/button2"
104         android:layout_alignTop="@+id/button4"
105         android:text="娱乐" />
106 
107     <Button
108         android:id="@+id/button6"
109         android:layout_width="wrap_content"
110         android:layout_height="wrap_content"
111         android:layout_alignBaseline="@+id/button5"
112         android:layout_alignBottom="@+id/button5"
113         android:layout_alignLeft="@+id/button3"
114         android:text="医疗" />
115 
116     <Button
117         android:id="@+id/button4"
118         android:layout_width="wrap_content"
119         android:layout_height="wrap_content"
120         android:layout_alignLeft="@+id/button1"
121         android:layout_below="@+id/button1"
122         android:text="交通" />
123 
124     <EditText
125         android:id="@+id/editText2"
126         android:layout_width="wrap_content"
127         android:layout_height="90dp"
128         android:layout_alignLeft="@+id/button4"
129         android:layout_alignRight="@+id/button6"
130         android:layout_below="@+id/button5"
131         android:layout_marginTop="34dp"
132         android:ems="10"
133         android:hint="备注:" />
134 
135     <Button
136         android:id="@+id/button7"
137         android:layout_width="wrap_content"
138         android:layout_height="wrap_content"
139         android:layout_alignLeft="@+id/editText2"
140         android:layout_alignParentBottom="true"
141         android:layout_alignRight="@+id/editText2"
142         android:text="OK" />
143 
144 </RelativeLayout>
View Code

2.Sqlite数据库demo已经完成,包括增、删、改、查,由冉负责。

以下是下次站会前需完成的任务

1.Sqlite数据库方面,确定表结构和通信接口,由冉负责。

2.数据逻辑处理层,确定与前端的通信接口,由王负责。

会议体会:昨天布置的任务大家都顺利完成,继续努力。以下是本周的燃尽图。

一周很快就会过去,无奈天气反复无常,OneZero已经有两名成员先后感染风寒,但大家依旧坚守阵地,夏十分感激。

以上是OneZero第二周第二次站立会议。

原文地址:https://www.cnblogs.com/xiaym896/p/5332784.html