加载从画廊的所有图像到Android中的应用 [英] Loading all the images from gallery into the Application in android

查看:157
本文介绍了加载从画廊的所有图像到Android中的应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建一个应用程序,其中我需要画廊的所有图像到我的应用程序中有一个girdview。我想从所有文件夹的所有图像显示在GridView。

I am creating an application wherein I need all the images in the gallery into my application that has a girdview in it. I want all the images from all the folders to appear in the gridview.

String[] proj = { MediaStore.Images.Media.DATA, MediaStore.Images.Media._ID };
actualimagecursor = managedQuery(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, proj,
                      null, null, MediaStore.Images.Media.DEFAULT_SORT_ORDER);

actual_image_column_index = actualimagecursor.getColumnIndexOrThrow(MediaStore.Images.Media._ID);
actualimagecursor.moveToPosition(position);
String i = actualimagecursor.getString(actual_image_column_index);

我已经加入这个code到我的code,但我只能得到没有其他文件夹的图像,得到SD卡的图像。 我怎样才能得到所有的图像从画廊?

I have added this code into my code but i get only the sd card images no other folder images are obtained. How can i get all the images from the gallery?

在此先感谢。

推荐答案

试试这些例子..

http://android-er.blogspot.in/2012/07/gridview-loading-photos-from-sd-card.html

<一个href="http://stackoverflow.com/questions/6855399/how-to-implement-image-gallery-in-gridview-in-android">How实现图片廊中的GridView中的android?

https://github.com/nostra13/Android-Universal-Image-Loader

http://mobile.dzone.com/news/displaying-images- SD卡

http://anusreeanair.blogspot.in/2012/09/android-fetch-images-from-sdcard-and.html

这篇关于加载从画廊的所有图像到Android中的应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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