[GalleryAdapter]Fixed the bug on preferences