Android——ACTION_GET_CONTENT和ACTION_PICK
来源:互联网 发布:淘宝0秒付款怎么做到的 编辑:程序博客网 时间:2024/06/06 07:22
通过两种方式获取手机图片
//方式一:通过隐式意图,设置Action为ACTION_GET_CONTENT,需要指定类型setType。Intent intent = new Intent(); intent.setAction(Intent.ACTION_GET_CONTENT); intent.setType("image/*"); activity.startActivityForResult(intent, 10);
//方式二:设置Action为ACTION_PICK,要指定dataIntent intent = new Intent(); intent.setAction(Intent.ACTION_PICK); intent.setData(MediaStore.Images.Media.EXTERNAL_CONTENT_URI); activity.startActivityForResult(intent, 11);
0 0
- Android——ACTION_GET_CONTENT和ACTION_PICK
- Android 巧用Itent.ACTION_PICK和Intent.ACTION_GET_CONTENT
- Android 巧用Itent.ACTION_PICK和Intent.ACTION_GET_CONTENT(一)
- Android 巧用Itent.ACTION_PICK和Intent.ACTION_GET_CONTENT(二)
- Android 巧用Itent.ACTION_PICK和Intent.ACTION_GET_CONTENT(三)
- Android 巧用Itent.ACTION_PICK和Intent.ACTION_GET_CONTENT(三)
- ACTION_PICK ACTION_GET_Content
- android之Itent.ACTION_PICK Intent.ACTION_GET_CONTENT妙用
- android之Itent.ACTION_PICK Intent.ACTION_GET_CONTENT妙用
- android之Itent.ACTION_PICK Intent.ACTION_GET_CONTENT妙用
- android之Itent.ACTION_PICK Intent.ACTION_GET_CONTENT妙用
- android之Itent.ACTION_PICK Intent.ACTION_GET_CONTENT妙用
- android之Itent.ACTION_PICK Intent.ACTION_GET_CONTENT妙用
- android Itent学习之 ACTION_PICK&ACTION_GET_CONTENT
- android之Itent.ACTION_PICK Intent.ACTION_GET_CONTENT妙用
- 81ACTION_GET_CONTENT和ACTION_PICK的区别
- ACTION_PICK与ACTION_GET_CONTENT
- Android获取本地图片之ACTION_GET_CONTENT与ACTION_PICK区别
- 最长可整合子数组
- 【LWJGL2 WIKI】【现代OpenGL篇】用BufferSubData更新VBO方形
- 【转】详解公钥、私钥、数字证书的概念
- ios之图片圆角半径
- FP-Tree算法的实现
- Android——ACTION_GET_CONTENT和ACTION_PICK
- UVa 10855 - Rotated square
- 时钟中断(1)
- 213,使用UINavigationController实现页面跳转
- 成功邮件发送2次
- bash array length
- JSTL---Servlet.service() for servlet action threw exceptionjavax.el.MethodNotFoundException Method s
- error C4013: 'RtlStringCbPrintf' undefined; assuming extern returning int
- Uva1629:Cake slicing