📄 qurymain.java
字号:
package com.android;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
//import android.widget.Spinner;
public class QuryMain extends Activity implements OnClickListener{
private EditText lDate;
private EditText lClass;
private Button lSelect;
private Button lReset;
private Button lReport;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.wallet_sel);
lDate=(EditText) findViewById(R.id.date_edit);
lClass=(EditText) findViewById(R.id.class_view);
lSelect=(Button) findViewById(R.id.select);
lReset=(Button) findViewById(R.id.reset);
lReport=(Button) findViewById(R.id.report);
lSelect.setOnClickListener(this);
lReset.setOnClickListener(this);
lReport.setOnClickListener(this);
}
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
String date_view=lDate.getText().toString();
String class_view=lClass.getText().toString();
String command= ((Button)v).getText().toString();
if(command.equals("select")){
Intent i = new Intent(this, FetchAllWallet.class);
i.putExtra(WalletDbAdapter.KEY_DATE, date_view);
i.putExtra(WalletDbAdapter.KEY_CLASS, class_view);
startActivityForResult(i, RESULT_OK);
}
if(command.equals("reset")){
lDate.setText("");
lClass.setText("");
}
if(command.equals("report")){
Intent j = new Intent(this, ReportAllWallet.class);
//i.putExtra(WalletDbAdapter.KEY_DATE, date_view);
//i.putExtra(WalletDbAdapter.KEY_CLASS, class_view);
startActivityForResult(j, RESULT_OK);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -