Ner*_*ero 4 android android-intent android-gallery android-image
我想在android画廊中显示一张照片,并能够将其他照片放在该文件夹上.
Intent intent = new Intent(Intent.ACTION_VIEW);
File f = new File(path);
intent.setDataAndType(Uri.parse("file://" + f.getAbsolutePath()), "image/*");
mContext.startActivity(intent);
Run Code Online (Sandbox Code Playgroud)
多数民众赞成我现在如何做,但不会让我滑动扔掉文件夹中的其余图像.我试过了:
没有运气.如果有人有解决方案,我会很高兴.谢谢!
Nit*_*tin 10
试试这个
Intent i=new Intent();
i.setAction(Intent.ACTION_VIEW);
i.setDataAndType(Uri.fromFile(new File(path)), "image/*");
startActivity(i);
Run Code Online (Sandbox Code Playgroud)
请参阅这些链接
如何使用Intent.ACTION_VIEW查看文件夹的内容?
如果这解决了你的问题.还检查一下
https://www.google.co.in/?gfe_rd=cr&ei=c5n9U6ruE7DO8gfXz4G4BA&gws_rd=ssl#q=view+like+gallery
还检查Gallery小部件
| 归档时间: |
|
| 查看次数: |
8056 次 |
| 最近记录: |