Changes

Jump to: navigation, search

Teams Winter 2011/team1/Android/Edit Contact

664 bytes added, 12:29, 7 April 2011
8.2 Create EditContactActivity
}
</source>
8.2.3 4 get the Intent of this Activity (later when starting this activity, we will send an Intent including the data of the selected student for editing). Then read he data from it and set the EditTexts values:
<source lang="java">
@Override
}
}
</source>
 
8.2.5 Add and implement the save button: in the OnCreate method:
 
<source lang="java">
//save Button implementation
Button saveButton = (Button) findViewById(R.id.saveContact_buttonEdit);
saveButton.setOnClickListener(new OnClickListener() {
public void onClick(View arg0) {
firstName = ((EditText) findViewById(R.id.firstNameEdit)).getText().toString();
lastName = ((EditText) findViewById(R.id.lastNameEdit)).getText().toString();
email = ((EditText) findViewById(R.id.emailEdit)).getText().toString();
finish();
}
});
</source>
1
edit

Navigation menu