
View and return type void<Button ...
android:text="@string/button_send"
android:onClick="sendMessage" />
((Button) findViewById(R.id.button2)).setOnClickListener(
new View.OnClickListener() {
@Override public void onClick(View arg0) {
...
}});
Intent intent = new Intent(Outerclass.this, ResponseActivity.class);
startActivity(intent) to start new intent.startActivityWithResult(intent, requestCode) to start new intent.Intent result = new Intent();
result.putExtra("...", ...);
setResult(Activity.RESULT_OK, result);
finish();
in order to return to the calling intent.
protected void onActivityResult(int requestCode, int resultCode, Intent data)


git clone git@github.com:sjsu-fall2013-cs175/solutions.git somewhere outside your cs175 repocs175/lab04:
cp -R solutions/hw01 cs175/lab04
lab04. Then rename the package to edu.sjsu.cs175.lab04 in the Package Explorer. Also rename the package in AndroidManifest.xml and change the app name to Lab 4 in values/strings.xml. (You should make it a habit to do this whenever you make a new lab or homework assignment.)tabs into the search box in the top left corner. Click on Text Editors and click on Insert spaces for tabs. But wait, that's not all. Now click on Java/Editor/Typing, then on the Formatter link, and on Edit. Change the name from Eclipse
(default) to CS185C, and change the Tabs poliy to Spaces only. Click on Apply and Ok. Go to MainActivity.java and select Source → Correct Indentation from the menu. Verify that there are now spaces in the file (by deleting a character in an indented line).
ResponseActivity with all the default options.MainActivity, make the first button go to the ResponseActivity when clicked. How did you do that?ResponseActivity. Use a for loop like in the onCreate method.