/* ownCloud Android client application\r
* Copyright (C) 2011 Bartek Przybylski\r
+ * Copyright (C) 2012-2013 ownCloud Inc.\r
*\r
* This program is free software: you can redistribute it and/or modify\r
* it under the terms of the GNU General Public License as published by\r
- * the Free Software Foundation, either version 3 of the License, or\r
+ * the Free Software Foundation, either version 2 of the License, or\r
* (at your option) any later version.\r
*\r
* This program is distributed in the hope that it will be useful,\r
\r
// set file details\r
setFilename(mFile.getFileName());\r
- setFiletype(DisplayUtils.convertMIMEtoPrettyPrint(mFile\r
- .getMimetype()));\r
+ setFiletype(mFile.getMimetype());\r
setFilesize(mFile.getFileLength());\r
if(ocVersionSupportsTimeCreated()){\r
setTimeCreated(mFile.getCreationTimestamp());\r
*/\r
private void setFiletype(String mimetype) {\r
TextView tv = (TextView) getView().findViewById(R.id.fdType);\r
- if (tv != null)\r
- tv.setText(mimetype);\r
+ if (tv != null) {\r
+ String printableMimetype = DisplayUtils.convertMIMEtoPrettyPrint(mimetype);; \r
+ tv.setText(printableMimetype);\r
+ }\r
+ ImageView iv = (ImageView) getView().findViewById(R.id.fdIcon);\r
+ if (iv != null) {\r
+ iv.setImageResource(DisplayUtils.getResourceId(mimetype));\r
+ }\r
}\r
\r
/**\r