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第二周第二次站立會議。

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM