Android中打开手机中存在的图片软件

来源:互联网 发布:大数据 教育行业营销 编辑:程序博客网 时间:2024/04/28 18:46

分为两种方式:

一、

Intent intent = new Intent();

intent.setType("image/*");

intent.setAction(Intent.ACTION_GET_CONTENT);

二、

Intent intent = new Intent();
intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
Intent wrapperIntent = Intent.createChooser(intent, null);
this.startActivityForResult(intent, 0);


两种方式不同点在于:第一种是系统显示样式,第二种是使用wrapper形式的样式。亲自试下吧。

0 0
原创粉丝点击