Search code examples
javaandroidandroid-intentandroid-gallery

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


I am using following intent to open gallery for picking multiple images and videos:

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

When the gallery is opened it looks like enter image description here

In the top it says 'open' i want to change it to 'done' or 'ok', how to achieve that? Thanks.


Solution

  • 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.