select multiple images in Android Gallery

前端 未结 3 1757
太阳男子
太阳男子 2020-12-03 08:42

i m working with one application that have one functionality to select multiple images from android inbuilt Gallery/Camera .

Gallery is open successful

相关标签:
3条回答
  • 2020-12-03 09:09

    Well, this is an old question, but I guess this might be still useful to somebody. I just released the source code for my multiple image selection activity. You can find it in the following GitHub repo:

    https://github.com/derosa/MultiImageChooser

    I hope it's useful for you!

    0 讨论(0)
  • 2020-12-03 09:16
     Cursor imagecursor1 = managedQuery(
        MediaStore.Images.Media.EXTERNAL_CONTENT_URI, columns, null,
        null, orderBy + " DESC");
    
       this.imageUrls = new ArrayList<String>();
      imageUrls.size();
    
       for (int i = 0; i < imagecursor1.getCount(); i++) {
       imagecursor1.moveToPosition(i);
       int dataColumnIndex = imagecursor1
         .getColumnIndex(MediaStore.Images.Media.DATA);
       imageUrls.add(imagecursor1.getString(dataColumnIndex));
      }
    
       options = new DisplayImageOptions.Builder()
      .showStubImage(R.drawable.stub_image)
      .showImageForEmptyUri(R.drawable.image_for_empty_url)
      .cacheInMemory().cacheOnDisc().build();
    
       imageAdapter = new ImageAdapter(this, imageUrls);
    
       gridView = (GridView) findViewById(R.id.PhoneImageGrid);
      gridView.setAdapter(imageAdapter);
    

    You want to more clarifications. http://mylearnandroid.blogspot.in/2014/02/multiple-choose-custom-gallery.html

    0 讨论(0)
  • 2020-12-03 09:21

    i had refer this two link link 1

    1: Select Multiple Images Using GalleryView and link 2

    but not getting Ans for which i m looking for .. but i have found alternative solution . Get all images from inbuilt Gallery and set it all our custom Gellery .. kindly check out this link Custom Gallery with checkbox

    i hope it will help you.

    0 讨论(0)
提交回复
热议问题