I’m using a Fragment that loads an Image into a ImageView.
I want to change that image with startActivityForResult() but when I finish that Activity and go back to the Fragment,the Fragment reloads the first image again.
Probably because of the onStart() method.
How can I avoid the Fragment to reload after onActivityResult()?
I found out what the problem was.
The fragment loads in the information in the onStart() method.
I had a look at the fragment lifecycle and found out that I had to
load the information in the onActivityCreated() method.
This way the view is already created and I can refer to my xml-objects.
Check out this image that explains the fragment lifecycle:
http://developer.android.com/images/activity_fragment_lifecycle.png