You can not "store images in an ImageView" persistently because ImageView is not a persistent object. It is recreated every time your activity calls setLayout() losing all state it may have had (or, to be exact, it doesn't exactly lose it's state because it gets replaced by a completely new blank ImageView).
Instead you need to store the image to a persistent storage (if you loaded it from the internet, for example) and reload it in onCreate().