gpt4 book ai didi

android - Android图像的Intent.ACTION_VIEW

转载 作者:塔克拉玛干 更新时间:2023-11-02 20:16:20 25 4
gpt4 key购买 nike

enter image description here

                    Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.setDataAndType(
Uri.parse("file://" +file.getAbsolutePath()),"image/*");
startActivity(intent);

我想使用 android intent 显示具有共享、删除和设置为功能的图像。但是我的图片打开时没有共享选项.........如何显示带有共享选项的图片?

最佳答案

默认情况下,它不会显示共享和删除选项。但是您可以使用 Intent 和 File 手动执行此操作。

关于android - Android图像的Intent.ACTION_VIEW,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23341499/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com