From: tobiasKaminsky Date: Sat, 9 Aug 2014 17:12:36 +0000 (+0200) Subject: Added x and y to specify maxX and maxY in route. X-Git-Tag: oc-android-1.7.0_signed~163^2~8^2~3 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/ba2d805197ce668eabc884300cee0f07d73ba242?ds=inline;hp=--cc Added x and y to specify maxX and maxY in route. --- ba2d805197ce668eabc884300cee0f07d73ba242 diff --git a/src/com/owncloud/android/ui/adapter/FileListListAdapter.java b/src/com/owncloud/android/ui/adapter/FileListListAdapter.java index 44e64824..e2ad4fa3 100644 --- a/src/com/owncloud/android/ui/adapter/FileListListAdapter.java +++ b/src/com/owncloud/android/ui/adapter/FileListListAdapter.java @@ -168,7 +168,8 @@ public class FileListListAdapter extends BaseAdapter implements ListAdapter { // TODO change to user preview.png - HttpGet httpget = new HttpGet(mClient.getBaseUri() + "/ocs/v1.php/thumbnail?path=" + URLEncoder.encode(file.getRemotePath(), "UTF-8")); + //HttpGet httpget = new HttpGet(mClient.getBaseUri() + "/index.php/core/preview.png?file="+URLEncoder.encode(file.getRemotePath(), "UTF-8")+"&x=36&y=36&forceIcon=1"); + HttpGet httpget = new HttpGet(mClient.getBaseUri() + "/ocs/v1.php/thumbnail?x=50&y=50&path=" + URLEncoder.encode(file.getRemotePath(), "UTF-8")); HttpResponse response = httpclient.execute(httpget); HttpEntity entity = response.getEntity(); @@ -181,7 +182,6 @@ public class FileListListAdapter extends BaseAdapter implements ListAdapter { if (thumbnail != null){ addBitmapToCache(imageKey, thumbnail); } - } } catch(Exception e){ e.printStackTrace(); @@ -194,7 +194,9 @@ public class FileListListAdapter extends BaseAdapter implements ListAdapter { } protected void onPostExecute(Bitmap bitmap){ - fileIcon.setImageBitmap(bitmap); + if (bitmap != null){ + fileIcon.setImageBitmap(bitmap); + } } }