fix file/download display
authorBartek Przybylski <bart.p.pl@gmail.com>
Wed, 16 May 2012 17:16:18 +0000 (19:16 +0200)
committerBartek Przybylski <bart.p.pl@gmail.com>
Wed, 16 May 2012 17:16:18 +0000 (19:16 +0200)
src/eu/alefzero/owncloud/ui/fragment/FileDetailFragment.java

index a01ce79..3e3082c 100644 (file)
@@ -127,7 +127,7 @@ public class FileDetailFragment extends SherlockFragment implements
             VideoView videoView = (VideoView) mView\r
                     .findViewById(R.id.videoView1);\r
             videoView.setVisibility(View.INVISIBLE);\r
             VideoView videoView = (VideoView) mView\r
                     .findViewById(R.id.videoView1);\r
             videoView.setVisibility(View.INVISIBLE);\r
-            if (mFile.getPath() == null) {\r
+            if (mFile.getStoragePath() == null) {\r
                 ImageView imageView = (ImageView) getView().findViewById(\r
                         R.id.imageView2);\r
                 imageView.setImageResource(R.drawable.download);\r
                 ImageView imageView = (ImageView) getView().findViewById(\r
                         R.id.imageView2);\r
                 imageView.setImageResource(R.drawable.download);\r
@@ -136,11 +136,11 @@ public class FileDetailFragment extends SherlockFragment implements
                 if (mFile.getMimetype().startsWith("image/")) {\r
                     ImageView imageView = (ImageView) mView\r
                             .findViewById(R.id.imageView2);\r
                 if (mFile.getMimetype().startsWith("image/")) {\r
                     ImageView imageView = (ImageView) mView\r
                             .findViewById(R.id.imageView2);\r
-                    Bitmap bmp = BitmapFactory.decodeFile(mFile.getPath());\r
+                    Bitmap bmp = BitmapFactory.decodeFile(mFile.getStoragePath());\r
                     imageView.setImageBitmap(bmp);\r
                 } else if (mFile.getMimetype().startsWith("video/")) {\r
                     videoView.setVisibility(View.VISIBLE);\r
                     imageView.setImageBitmap(bmp);\r
                 } else if (mFile.getMimetype().startsWith("video/")) {\r
                     videoView.setVisibility(View.VISIBLE);\r
-                    videoView.setVideoPath(mFile.getPath());\r
+                    videoView.setVideoPath(mFile.getStoragePath());\r
                     videoView.start();\r
                 }\r
             }\r
                     videoView.start();\r
                 }\r
             }\r