Android——调用系统相册
来源:互联网 发布:用友成都java招聘 编辑:程序博客网 时间:2024/05/16 09:51
一、调用系统相册App,浏览所用图片
Intent intent = new Intent(); intent.setAction(Intent.ACTION_VIEW); intent.setType("image/*"); startActivity(intent);
二、调用系统相册,并从中选择一张照片
Intent intent = new Intent(); intent.setAction(Intent.ACTION_GET_CONTENT); intent.setType("image/*"); startActivityForResult(Intent.createChooser(intent, "Select Picture"),1);
三、调用系统相册查看单张(或特定)图片(此处系转载:http://java-android.blogbus.com/logs/151611473.html)
//下方是将ImageList集合中的图片路径转换为可供File识别的String数据, String value = String.valueOf(mImagesList.get(pos).getPicturePath()); File file = new File(value); //下方是是通过Intent调用系统的图片查看器的关键代码 Intent intent = new Intent(); intent.setAction(android.content.Intent.ACTION_VIEW); intent.setDataAndType(Uri.fromFile(file), "image/*"); startActivity(intent);
0 0
- Android——调用系统相册
- 调用系统相册 Android
- android调用系统相册
- Android 多媒体应用——调用系统相机和相册
- Android 调用系统 相册代码
- Unity3D调用Android系统相册
- android怎样调用系统相册
- 调用Android系统相册并裁剪图片
- Android 调用系统相册(带裁剪)
- Android 调用系统相机以及相册源码
- Android 调用系统相机以及相册源码
- android 调用系统相机和相册
- 在WebView中调用android系统相册
- Android调用系统相机和相册
- Android调用系统相机和相册-填坑篇
- Android调用系统相机和相册
- 【Android】调用系统相册选择图片
- Android调用系统相机和相册
- 解决Ubuntu终端中文乱码显示问题
- 项目从想法到实现需要经历哪些过程
- android Theme level 11 使用总结
- 【深度学习论文笔记】Spatial Pyramid Pooling in Deep Convolutional Networks for Visual Recognition
- python创建你自己的命令行,地址簿程序
- Android——调用系统相册
- POJ1006 Biorhythms
- hdu 4869 Turn the pokers 策略(组合数)
- Android下写一个永远不会被KILL掉的进程/服务
- dao dao
- Uva 11234 Expressions (二叉树的层次遍历)
- C/C++函数指针声明
- 在windows cgywinportable上,通过执行linux命令,批量修改文件名称。
- Linux rpm 命令参数使用详解