Android gallery pick like Whatsapp

2019-06-23 16:55发布

This question has been asked before but I'm afraid answers might be outdated. How can I use the native gallery app (say API 14 on) to achieve multiple image selection like WhatsApp?

2条回答
放荡不羁爱自由
2楼-- · 2019-06-23 17:08

None worked, so I ended up using one of the open source libraries for Android: Universal Image Loader.

查看更多
Anthone
3楼-- · 2019-06-23 17:09

do you mean:

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);

Note: the EXTRA_ALLOW_MULTIPLE option is only available in Android API 18 and higher.

This link talks about creating custom image picker with multiple select.

查看更多
登录 后发表回答