Here is a small trick for preventing a folder from appearing in the Gallery application:
Why do we need it?!
The main reason for hiding a folder from the Gallery application is… well… because you just want that particular folder to remain hidden! Sometimes you have to cache images or any other media files and you usually store them in a folder. But the Gallery application is very good in finding directories which contain media files and so your folder appears in the Gallery app. And you will agree with me that it’s not a good idea to show the user all your dirty and nasty hacks, transformations and changes you had made to the media files used by your application. Thus, hiding such folders suddenly seems beneficial.