Intent return data pass value
Avatar replacement function
- 1. Create an intent object startActivityForResult(intent, requestCode)
- 2. Go to the second page to process the data and call setResult (return code, which encapsulates the returned data intent object)
- 3. Call OnActivityResult (request code, response code, intent) to get the returned data
Created the MainActivity layout