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

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

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

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

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

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

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

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

相关文章:

  • 2022-02-25
  • 2021-09-17
  • 2021-11-22
  • 2021-09-08
  • 2022-01-09
  • 2021-06-16
  • 2021-10-08
猜你喜欢
  • 2021-07-10
  • 2021-07-05
  • 2021-10-03
  • 2021-05-17
  • 2021-08-26
  • 2021-06-22
  • 2021-10-29
相关资源
相似解决方案