开发者

android: how to hide folder from appearing in the Gallery

I have an application that creates a folder in the sd-card. After that, I do several operations which may re开发者_如何学运维sult 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?

Looking forward for a response Thanks


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


Go to My Files folder, then Pictures or create a folder and name it whatever you want. Go the newly created folder, add another folder again and name it .nomedia. Copy or move photos in the folder (not the .nomedia coz it won't show after creating it). Then you check in the gallery, and voila! Folder isn't shown!

PS: The pictures you have copied/moved can be viewed only in My Files folder, which is much safer.. ;) PPS: This works on my samsung galaxy win.

Hope I had helped a little Thanks.


You will start the name of the folder with a period (.). Example: .asdhsj


Just start the folder name with period (.), it can be any name, but needs to start with period. After that the folder and it's files don't appear in gallery anymore :)


For people who are on android version 5.1.1 some of you cant do this but what you can do is change the extention of that file, for example image.png change ".png" to something like ".txt" or something that way it doesnt show up in your gallery


Happily album covers has a solution.

Here is the solution ; Rename all album cover picture files to albumart.jpg

My detailed answer can be found here Stop images on sd card from showing up in gallery?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜