From: Bartek Przybylski Date: Thu, 12 Jul 2012 20:26:33 +0000 (+0200) Subject: make preview a bit smaller than screen width X-Git-Tag: oc-android-1.4.3~279 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/0d4f5d38c30cb0c489d721080e09a4d8116a6dbd?hp=--cc make preview a bit smaller than screen width --- 0d4f5d38c30cb0c489d721080e09a4d8116a6dbd diff --git a/src/eu/alefzero/owncloud/ui/fragment/FileDetailFragment.java b/src/eu/alefzero/owncloud/ui/fragment/FileDetailFragment.java index bbc2473e..c94719ee 100644 --- a/src/eu/alefzero/owncloud/ui/fragment/FileDetailFragment.java +++ b/src/eu/alefzero/owncloud/ui/fragment/FileDetailFragment.java @@ -879,7 +879,7 @@ public class FileDetailFragment extends SherlockFragment implements Log.e("ASD", "W " + width + " SW " + screenwidth); if (width > screenwidth) { - scale = (int) Math.ceil((Math.ceil(Math.max(height, width) / screenwidth))); + scale = (int) Math.ceil((float)width / screenwidth); options.inSampleSize = scale; }