in my android app, I am listing the images' previews with network image view. I want that if user press the previews it opens an activity with viewpager and show the original images of specific item of my recycler view. So, i have a two method in my mind.
1-) I will save two image for each of my images in my database. One of them will be preview image with small size and other one will be the original one. In my main newsfeed, app will load the preview images so download size will be smaller. And if user press a preview image it will open activity and download the original one.
2-) There will be only original images in my db and i will minimize it's size after the download and if user press the preview it will show the original one directly since it is already downloaded.
I wonder which one is better method, or is there a better method than those?
This is where i set click listeners for my images:
for(int i = 0; i < listItem.getImageCount(); i++) {
final NetworkImageView niv = new NetworkImageView(context);
niv.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
}
});
holderr.layoutImages.addView(niv);
}
Thank you.