Skip to content
This repository was archived by the owner on Jul 27, 2019. It is now read-only.

Commit fdcb933

Browse files
committed
Handling onActivityResult() for Image Editor, displaying edited image in ImageView.
1 parent c3057f1 commit fdcb933

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

image-editor-ui/app/src/main/java/com/adobe/imageeditorui/MainActivity.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,25 @@ public void onClick(View view) {
4848
});
4949
}
5050

51+
/* Handle the results */
52+
@Override
53+
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
54+
if (resultCode == RESULT_OK) {
55+
switch (requestCode) {
56+
57+
/* Make a case for the request code we passed to startActivityForResult() */
58+
case 1:
59+
60+
/* Show the image! */
61+
Uri editedImageUri = data.getData();
62+
mEditedImageView.setImageURI(editedImageUri);
63+
64+
break;
65+
}
66+
}
67+
}
68+
69+
5170
@Override
5271
public boolean onCreateOptionsMenu(Menu menu) {
5372
// Inflate the menu; this adds items to the action bar if it is present.

0 commit comments

Comments
 (0)