How to change 'open' in gallery intent to 'done'?

好久不见. 提交于 2019-12-06 09:48:27

When the gallery is opened it looks like

There are ~2 billion Android devices, spread across thousands of device models. Your Intent will open one of hundreds, if not thousands, of possible Android apps installed on those devices. It does not have anything specific to do with a "gallery" and certainly has nothing to do with whatever specific app you have in your screenshot. That just happens to be what shows up when you run your code on one specific device.

how to achieve that?

You write your own UI, rather than delegating it to somebody else's app. You do not control the UI of other developers' apps.

As Ahmad points out, there are many image picker libraries. Perhaps you could use one.

Ahmad Aghazadeh

EDIT: Changed "images/*" to "image/*"

Change this line intent.setType("video/*, image/*");

    Intent intent = new Intent();
    intent.setType("video/*, image/*");
    intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);
    intent.setAction(Intent.ACTION_GET_CONTENT);
    startActivityForResult(Intent.createChooser(intent, "Select Images"), MULTIPLE_IMAGE_SELECT);

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

Can use custom lib. Like :

MultipleImagePick

MultiImageSelector

TelegramGallery

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