OnClicking an Item in A ListView Fragment, Control passes to Detail Activity, which downloads the data related to this item and sets the appropriate adapters for the viewpagers in this activity.Within this activity, if a user clicks on a image, a FullScreen Activity starts which shows this particular image in fullscreen.
Now My problem is: when user leaves this FullScreen Activity by either tapping Close Icon or Back Button Traversing, How do i reuse the Detail Activity Data(Downloaded earlier for this item) instead of downloading it again. Solution Should also work for scenario when user clicks a new item on Detail Activity,Data Downloading should begin for this item.
Don't want to use SQLLite, FileSystem for storage. I am ok with downloading data when a item is clicked in a ListView but not when user traverses back from the fullscreen activity
You need to cache the Data so then you don't download the same. There are storage options other then sqlite.
Its upto you to decide who you implement the cache
http://developer.android.com/guide/topics/data/data-storage.html
Here's the implementation
There is an example in the docs
http://developer.android.com/training/displaying-bitmaps/index.html
Download the zip file
DisplayingBitmaps.zip
. The example has a implementation of cache for images.http://developer.android.com/training/displaying-bitmaps/cache-bitmap.html
Using Universal Image Loader
Caching images and displaying
Edit:
BitmapFun sample snap shots.
Images are downloaded and cached
Detailed View
Now loading other images when scrolled. Images are not yet cached
With all the three its easy to understand.