question: private static void populateMimeTypeIconMapping ( ) { MIMETYPE_TO_ICON_MAPPING . put ( "application/coreldraw" , R . drawable . file_image ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/epub+zip" , R . drawable . file_text ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/font-sfnt" , R . drawable . file_image ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/font-woff" , R . drawable . file_image ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/illustrator" , R . drawable . file_image ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/javascript" , R . drawable . file_code ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/json" , R . drawable . file_code ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/msaccess" , R . drawable . file ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/msexcel" , R . drawable . file_xls ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/mspowerpoint" , R . drawable . file_ppt ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/msword" , R . drawable . file_doc ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/octet-stream" , R . drawable . file ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/postscript" , R . drawable . file_image ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/pdf" , R . drawable . file_pdf ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/rss+xml" , R . drawable . file_code ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/rtf" , R . drawable . file ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/vnd.android.package-archive" , R . drawable . file_zip ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/vnd.ms-excel" , R . drawable . file_xls ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/vnd.ms-excel.addin.macroEnabled.12" , R . drawable . file_xls ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/vnd.ms-excel.sheet.binary.macroEnabled.12" , R . drawable . file_xls ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/vnd.ms-excel.sheet.macroEnabled.12" , R . drawable . file_xls ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/vnd.ms-excel.template.macroEnabled.12" , R . drawable . file_xls ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/vnd.ms-fontobject" , R . drawable . file_image ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/vnd.ms-powerpoint" , R . drawable . file_ppt ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/vnd.ms-powerpoint.addin.macroEnabled.12" , R . drawable . file_ppt ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/vnd.ms-powerpoint.presentation.macroEnabled.12" , R . drawable . file_ppt ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/vnd.ms-powerpoint.slideshow.macroEnabled.12" , R . drawable . file_ppt ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/vnd.ms-powerpoint.template.macroEnabled.12" , R . drawable . file_ppt ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/vnd.ms-word.document.macroEnabled.12" , R . drawable . file_doc ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/vnd.ms-word.template.macroEnabled.12" , R . drawable . file_doc ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/vnd.oasis.opendocument.presentation" , R . drawable . file_ppt ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/vnd.oasis.opendocument.presentation-template" , R . drawable . file_ppt ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/vnd.oasis.opendocument.spreadsheet" , R . drawable . file_xls ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/vnd.oasis.opendocument.spreadsheet-template" , R . drawable . file_xls ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/vnd.oasis.opendocument.text" , R . drawable . file_doc ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/vnd.oasis.opendocument.text-master" , R . drawable . file_doc ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/vnd.oasis.opendocument.text-template" , R . drawable . file_doc ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/vnd.oasis.opendocument.text-web" , R . drawable . file_doc ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/vnd.openxmlformats-officedocument.presentationml.presentation" , R . drawable . file_ppt ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/vnd.openxmlformats-officedocument.presentationml.slideshow" , R . drawable . file_ppt ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/vnd.openxmlformats-officedocument.presentationml.template" , R . drawable . file_ppt ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" , R . drawable . file_xls ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/vnd.openxmlformats-officedocument.spreadsheetml.template" , R . drawable . file_xls ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/vnd.openxmlformats-officedocument.wordprocessingml.document" , R . drawable . file_doc ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/vnd.openxmlformats-officedocument.wordprocessingml.template" , R . drawable . file_doc ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/x-7z-compressed" , R . drawable . file_zip ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/x-bin" , R . drawable . file_application ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/x-cbr" , R . drawable . file_text ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/x-compressed" , R . drawable . file_zip ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/x-dcraw" , R . drawable . file_image ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/x-deb" , R . drawable . file_zip ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/x-font" , R . drawable . file_image ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/x-gimp" , R . drawable . file_image ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/x-gzip" , R . drawable . file_zip ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/x-ms-dos-executable" , R . drawable . file_application ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/x-msi" , R . drawable . file_application ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/x-iwork-numbers-sffnumbers" , R . drawable . file_xls ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/x-iwork-keynote-sffkey" , R . drawable . file_ppt ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/x-iwork-pages-sffpages" , R . drawable . file_doc ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/x-perl" , R . drawable . file_code ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/x-photoshop" , R . drawable . file_image ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/x-php" , R . drawable . file_code ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/x-rar-compressed" , R . drawable . file_zip ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/x-shockwave-flash" , R . drawable . file_application ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/x-tar" , R . drawable . file_zip ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/x-tex" , R . drawable . file_text ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/xml" , R . drawable . file_text ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/yaml" , R . drawable . file_code ) ; MIMETYPE_TO_ICON_MAPPING . put ( "application/zip" , R . drawable . file_zip ) ; MIMETYPE_TO_ICON_MAPPING . put ( "database" , R . drawable . file ) ; MIMETYPE_TO_ICON_MAPPING . put ( "httpd/unix-directory" , R . drawable . ic_menu_archive ) ; MIMETYPE_TO_ICON_MAPPING . put ( "image/svg+xml" , R . drawable . file_image ) ; MIMETYPE_TO_ICON_MAPPING . put ( "image/vector" , R . drawable . file_image ) ; MIMETYPE_TO_ICON_MAPPING . put ( "text/calendar" , R . drawable . file_calendar ) ; MIMETYPE_TO_ICON_MAPPING . put ( "text/css" , R . drawable . file_code ) ; MIMETYPE_TO_ICON_MAPPING . put ( "text/csv" , R . drawable . file_xls ) ; MIMETYPE_TO_ICON_MAPPING . put ( "text/html" , R . drawable . file_code ) ; MIMETYPE_TO_ICON_MAPPING . put ( "text/vcard" , R . drawable . file_vcard ) ; MIMETYPE_TO_ICON_MAPPING . put ( "text/x-c" , R . drawable . file_code ) ; MIMETYPE_TO_ICON_MAPPING . put ( "text/x-c++src" , R . drawable . file_code ) ; MIMETYPE_TO_ICON_MAPPING . put ( "text/x-h" , R . drawable . file_code ) ; MIMETYPE_TO_ICON_MAPPING . put ( "text/x-python" , R . drawable . file_code ) ; MIMETYPE_TO_ICON_MAPPING . put ( "text/x-shellscript" , R . drawable . file_code ) ; MIMETYPE_TO_ICON_MAPPING . put ( "web" , R . drawable . file_code ) ; MIMETYPE_TO_ICON_MAPPING . put ( "DIR" , R . drawable . ic_menu_archive ) ; }
target:  populates the mapping list:  full mime type --> icon.