android:如何隐藏文件夹不出现在图库中 [英] android: how to hide folder from appearing in the Gallery

查看:35
本文介绍了android:如何隐藏文件夹不出现在图库中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序可以在 SD 卡中创建一个文件夹.之后,我做了一些操作,这可能会导致在我的文件夹中存储不同的媒体文件、图形.问题是此文件夹在不合适的图库部分中可见.如何隐藏文件夹或文件夹中的内容,使其不显示在图库中?

I have an application that creates a folder in the sd-card. After that, I do several operations which may result in storing different media files, graphics in my folder. The problem is that this folder is then visible in the Gallery section which is not appropriate. How can I hide the folder or the contents of my folder from appearing in the Gallery?

期待回复谢谢

推荐答案

在文件夹中放入一个名为 .nomedia 的文件.如果需要,这可以是一个零字节文件——名称很重要.

Put a file named .nomedia in the folder. This can be a zero-byte file if you want -- the name is what matters.

这篇关于android:如何隐藏文件夹不出现在图库中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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