文件夹中的Android打开画廊 [英] Android open gallery from folder

查看:69
本文介绍了文件夹中的Android打开画廊的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在android gallery中显示一张照片,并能够将其他照片滑动扔到该文件夹​​中.

I want to show a photo in android gallery, and be able to slide throw the others photos on that folder.

Intent intent = new Intent(Intent.ACTION_VIEW);
File f = new File(path);
intent.setDataAndType(Uri.parse("file://" + f.getAbsolutePath()), "image/*");
mContext.startActivity(intent);

这就是我现在的操作方式,但是不会让我滑动将其余图像丢到文件夹中.我试过了:

thats how i am doing it now, but wont let me slide throw the rest of the images in the folder. i tried:

如何在android?

内置文件夹在特定文件夹中

带文件夹过滤器的画廊

没有任何运气.如果有人有解决方案,我将非常高兴.谢谢!

Without any luck. i would be really happy if someone have the solution. Thanks!

推荐答案

尝试一下

Intent i=new Intent();
i.setAction(Intent.ACTION_VIEW);
i.setDataAndType(Uri.fromFile(new File(path)), "image/*");  
startActivity(i);

查看这些链接

如何可以使用Intent.ACTION_VIEW查看文件夹的内容吗?

Android ACTION_VIEW多个图像

Java和Android:如何打开有意图的几个文件?

如果这可以解决您的问题.还要检查

if this solves your problem. Also check

https://www.google.co.in/?gfe_rd=cr&ei=c5n9U6ruE7DO8gfXz4G4BA&gws_rd=ssl#q=view+like+gallery

还要检查图库小部件

这篇关于文件夹中的Android打开画廊的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆