安卓基本语句有public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
//1实力化
private void m1() {
etUserName=(EditText) this.findViewById(R.id.etUserName);
etPassword=(EditText) this.findViewById(R.id.etPassword);
btnLogin=(Button) this.findViewById(R.id.btnLogin);
btnReset=(Button) this.findViewById(R.id.btnReset);
myIntent=new Intent(getApplicationContext(), FrmMain.class);
}
//2监听器