summaryrefslogtreecommitdiffstats
path: root/Android/02-Intents/IntentsLab/src/course/labs/intentslab/ExplicitlyLoadedActivity.java
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-02-12 22:31:14 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2016-11-10 17:40:54 +0100
commit3c228228209bb186ab6881eb9b9bae10c1d5c893 (patch)
treeef617fcc2184c5a9542ecfb5c165ae3f1c546820 /Android/02-Intents/IntentsLab/src/course/labs/intentslab/ExplicitlyLoadedActivity.java
parentee3ef2bcf3656e3e7a02d86d43858cc8145508da (diff)
downloadcoursera-3c228228209bb186ab6881eb9b9bae10c1d5c893.zip
coursera-3c228228209bb186ab6881eb9b9bae10c1d5c893.tar.gz
Android : 02-Intents: implement
Diffstat (limited to 'Android/02-Intents/IntentsLab/src/course/labs/intentslab/ExplicitlyLoadedActivity.java')
-rw-r--r--Android/02-Intents/IntentsLab/src/course/labs/intentslab/ExplicitlyLoadedActivity.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/Android/02-Intents/IntentsLab/src/course/labs/intentslab/ExplicitlyLoadedActivity.java b/Android/02-Intents/IntentsLab/src/course/labs/intentslab/ExplicitlyLoadedActivity.java
index 5c33228..80c19f8 100644
--- a/Android/02-Intents/IntentsLab/src/course/labs/intentslab/ExplicitlyLoadedActivity.java
+++ b/Android/02-Intents/IntentsLab/src/course/labs/intentslab/ExplicitlyLoadedActivity.java
@@ -39,9 +39,9 @@ public class ExplicitlyLoadedActivity extends Activity {
// Sets result to send back to calling Activity and finishes
private void enterClicked() {
Log.i(TAG,"Entered enterClicked()");
- // TODO - Save user provided input from the EditText field
- // TODO - Create a new intent and save the input from the EditText field as an extra
- // TODO - Set Activity's result with result code RESULT_OK
- // TODO - Finish the Activity
+ Intent intent = new Intent();
+ intent.putExtra("data", mEditText.getText().toString());
+ setResult(RESULT_OK, intent);
+ finish();
}
}