Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Images loaded in ImageView disappear on fragment reLoad

I have a Fragment to edit contents. In this Fragment I have ImageView which displays image picked from gallery or camera This Fragment in turn also opens another fragment. From this fragment when I goes back to Edit fragment displayed image goes disappear and ImageViews goes blank and every thing else (Edittext,Textviews) remains persistant(filled)

Note that when I goes back to edit fragment its OnCreateView is called not OnCreate method for example when we replace fragment with another fragment and Pops Back to previous one its OnCreateView method is called first

I can't understand what is happening pls Help.

like image 347
HemangNirmal Avatar asked Nov 23 '22 10:11

HemangNirmal


1 Answers

old, but maybe this can help others.

I solving this by set source path to variable, then call in onResume() method.

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

    //set again your ImageView source here..
}
like image 65
IRvanFauziE Avatar answered Nov 24 '22 23:11

IRvanFauziE