Note that there are some explanatory texts on larger screens.

plurals
  1. POGallery is loading all the images but gallery should be load one image at a time
    text
    copied!<p>i have created a gallery for display images haveing pinchzoom with goto next and previous by touch . i were use to visit <a href="https://github.com/kilaka/ImageViewZoom" rel="nofollow">https://github.com/kilaka/ImageViewZoom</a> library . i saw Gallery first upload all the images and then it is displaying images which is good activity. but gallery can upload max 4MB images , if images size go to greater than 4MB then it gives us Bitmap outofmemory error. i have used to bitmap.recycle() but it is recycle all the images. </p> <p>do here any way, so my gallery upload images one by one from sdcard and when i will go to next or previous images by touch , my currently images memory should be delete . and next images should be uploaded in gallery memory . so my gallery can upload a number of images .</p> <p>this is my code , this code is link from visit <a href="https://github.com/kilaka/ImageViewZoom" rel="nofollow">https://github.com/kilaka/ImageViewZoom</a> :-</p> <pre><code> gallery = new GalleryTouch(this); gallery = (GalleryTouch) findViewById(R.id.image); gallery.setSpacing(20); arrayAdapter = new ArrayAdapter&lt;ImageView&gt;(this, -1) { @Override public View getView(int position, View convertView, ViewGroup parent) { bookM= position; return getItem(position); } }; if(!(it.isEmpty() )) { Collections.sort(it); for(int i=0; i&lt;it.size();i++) { ImageViewTouch imageView = new ImageViewTouch(imageTouch.this); imageView.setLayoutParams(new Gallery.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT)); final Options options = new Options(); options.outHeight = (int) scaleHeight; options.outWidth = (int) scaleWidth; options.inScaled = true; options.inPurgeable = true; options.inSampleSize = 2; String photoURL = it.get(i); bitmap = BitmapFactory.decodeFile(photoURL,options); imageView.setImageBitmap(bitmap); arrayAdapter.add(imageView); } gallery.setAdapter(arrayAdapter); } </code></pre> <p>Note:- in this code, "it" is a variable of List it; and list having a list of path of image from sd card like as sdcard/images/one.jpg , sdcard/images/two.jpg ........ etc.</p> <p>please expert help me , thank you for your important time. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload