Images uploaded to ImageView disappear on reLoad fragment

I have a snippet for editing content. In this snippet, I have an ImageView that displays an image selected from a gallery or camera. This fragment, in turn, also opens another fragment. From this fragment, when I return to the Edit fragment, the image is displayed disappears and ImageViews is empty, and everything else (Edittext, Textviews) remains unchanged (filled)

Please note that when I return to editing a fragment, its OnCreateView is not called by the OnCreate method, for example, when we replace a fragment with another fragment and Pops Back to previous one its OnCreateView method is called first

I cannot understand what is going on in the PLS Help.

+4
source share
1 answer

old, but maybe it can help others.

I solved this problem by setting the source path to the variable and then calling the onResume () method.

@Override
public void onResume() {
    super.onResume();

    //set again your ImageView source here..
}
0
source

All Articles