简体   繁体   English

更改默认照片选择器意图文本?

[英]Change default photo picker intent text?

Photo picker intent: 照片选择器意图:

        Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);
        photoPickerIntent.setType("image/*");
        startActivityForResult(photoPickerIntent, SELECT_PHOTO);

The text, shown below, currently says "Complete action using Photos". 如下所示,该文本目前显示“使用照片完成操作”。 Is there a way to change this to something custom? 有没有办法将其改为自定义?

在此输入图像描述

It's simple. 这很简单。 The answer is No. Also in won't always be "with Photos", it will depend on most used(or recent) app for this kind of Action. 答案是否定的。另外,并不总是“带照片”,它将取决于最常用的(或最近的)应用程序用于此类操作。

Lil update Lil更新

You can use some other way of doing this. 您可以使用其他一些方法来执行此操作。

Intent.createChooser(yourIntent, "Open via ..." /*your text goes here*/)

This will look differently, but will have your text 这看起来会有所不同,但会有你的文字

Use like this 像这样使用

 this.startActivity(Intent.createChooser(emailIntent, "Send mail via ..."));

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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