重新使用默认的Andr​​oid的图片库? [英] Reusing default Android image gallery?

查看:103
本文介绍了重新使用默认的Andr​​oid的图片库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所有我在网上显示图像的库需要创建一个自定义的适配器和做大量的手工工作中发现的例子。是不是有一个意向,我可以简单地传递一个路径或过滤器,以重新使用默认的图片库功能(显示缩略图,触摸查看全图,PIC,共享选项等),但结果限制为我的应用程序的存储目录<? / P>

解决方案
  1. 画廊应用程序没有权限访问你的应用程序的存储目录中的文件。

  2. Gallery应用程序是不是Android操作系统的一部分。

  3. 画廊应用程序经常更换由设备制造商提供自己的实现,因此,即使你发现了一些扭曲后门到启用该正规画廊的应用程序,它可能不会在许多设备上工作。

  4. Android的本身,在开源项目中,有两个Gallery应用程序(图库和Gallery3D),我不知道这是必然的任何设备(如果有一个),或者是你认为用品之一默认的图片库的功能。

然而,这些库的应用程序都是开源的,所以欢迎您复制任何code,你喜欢了出来。

All the examples I've found online for displaying a gallery of images require creating a custom Adapter and doing a ton of manual work. Is there not an Intent that I can simply pass a path or filter to in order to reuse the default image gallery functionality (display thumbnails, touch to view full pic, sharing options, etc) but limit the results to my application's storage directory?

解决方案

  1. The Gallery application has no rights to access files in your application's storage directory.

  2. The Gallery application is not part of the Android operating system.

  3. The Gallery application is routinely replaced by device manufacturers with their own implementations, so even if you found some screwy back-door to the regular Gallery application that enabled this, it probably would not work on many devices.

  4. Android itself, in the open source project, has two Gallery applications (Gallery and Gallery3D), and I don't know which are necessarily on any device (if either) or which is the one that you think supplies "the default image gallery functionality".

However, those Gallery applications are open source, and so you are welcome to copy whatever code you like out of them.

这篇关于重新使用默认的Andr​​oid的图片库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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