Android gallery pick like Whatsapp

一世执手 提交于 2019-12-10 13:55:31

问题


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?


回答1:


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.




回答2:


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



来源:https://stackoverflow.com/questions/25698815/android-gallery-pick-like-whatsapp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!