简体   繁体   中英

How can I have a user select multiple images from the gallery, and as they are selected have them put into a queue in order?

This is the code that opens the gallery when my button is pressed.

 public void openGallery(View v){
        if (v.getId() == R.id.GALLERY){
        Intent intent = new Intent();
        intent.setType("image/*");
        intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);
        intent.setAction(Intent.ACTION_GET_CONTENT);
        startActivityForResult(Intent.createChooser(intent,"Select Picture"), 1);
}
}

This code works to open the gallery, but when the user presses the pictures they want, is there a way to place those pictures into a queue int the order the user presses them in?

is there a way to place those pictures into a queue int the order the user presses them in?

No. If you want that, do not use ACTION_GET_CONTENT , but instead create your own gallery-style UI where you have complete control over the user interaction.

Or, do not worry about the order from ACTION_GET_CONTENT , but instead have the user put the images in the proper order in your own UI.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM