意图:删除始终/只有一次按钮 [英] Intent : remove Always / Only once buttons
本文介绍了意图:删除始终/只有一次按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是pretty新的Android开发。
是否可以取出两个按钮(总是/仅一次)打开时 Intent.ACTION_GET_CONTENT
下面是我目前的code。
意向意图=新意图(Intent.ACTION_GET_CONTENT);
intent.setType(图像/ *);
startActivityForResult(意向,PICK);
解决方案
我找到了一种方法来实现这一目标:
意向意图=新意图(Intent.ACTION_GET_CONTENT);
intent.setType(图像/ *);
意向openInChooser = Intent.createChooser(意向,打开方式...);
startActivityForResult(openInChooser,PICK);
I'm pretty new to Android development.
Is it possible to remove the two buttons (Always / Only Once) when opening an Intent.ACTION_GET_CONTENT
?
Here is my current code.
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.setType("image/*");
startActivityForResult(intent,PICK);
解决方案
I found a way to achieve this :
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.setType("image/*");
Intent openInChooser = Intent.createChooser(intent, "Open in...");
startActivityForResult(openInChooser,PICK);
这篇关于意图:删除始终/只有一次按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文