Mat*_*ler 6 android android-intent
我是Android开发的新手.
打开时可以取下两个按钮(始终/仅一次)Intent.ACTION_GET_CONTENT吗?
这是我目前的代码.
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.setType("image/*");
startActivityForResult(intent,PICK);
Run Code Online (Sandbox Code Playgroud)
Mat*_*ler 13
我找到了实现这个目标的方法:
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.setType("image/*");
Intent openInChooser = Intent.createChooser(intent, "Open in...");
startActivityForResult(openInChooser,PICK);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2358 次 |
| 最近记录: |