Refactoring and clean-up of fragment for media previews
[pub/Android/ownCloud.git] / src / com / owncloud / android / ui / activity / FileDetailActivity.java
index 6994c09..2db3d7f 100644 (file)
@@ -40,7 +40,7 @@ import com.owncloud.android.files.services.FileDownloader.FileDownloaderBinder;
 import com.owncloud.android.files.services.FileUploader;\r
 import com.owncloud.android.files.services.FileUploader.FileUploaderBinder;\r
 import com.owncloud.android.ui.fragment.FileDetailFragment;\r
-import com.owncloud.android.ui.fragment.FilePreviewFragment;\r
+import com.owncloud.android.ui.preview.PreviewMediaFragment;\r
 \r
 import com.owncloud.android.R;\r
 \r
@@ -120,9 +120,9 @@ public class FileDetailActivity extends SherlockFragmentActivity implements File
         int mode = getIntent().getIntExtra(EXTRA_MODE, MODE_PREVIEW); \r
         \r
         Fragment newFragment = null;\r
-        if (FilePreviewFragment.canBePreviewed(mFile) && mode == MODE_PREVIEW) {\r
+        if (PreviewMediaFragment.canBePreviewed(mFile) && mode == MODE_PREVIEW) {\r
             if (mFile.isDown()) {\r
-                newFragment = new FilePreviewFragment(mFile, mAccount);\r
+                newFragment = new PreviewMediaFragment(mFile, mAccount);\r
             \r
             } else {\r
                 newFragment = new FileDetailFragment(mFile, mAccount);\r
@@ -307,7 +307,7 @@ public class FileDetailActivity extends SherlockFragmentActivity implements File
         if (success) {\r
             if (mWaitingToPreview) {\r
                 FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();\r
-                transaction.replace(R.id.fragment, new FilePreviewFragment(file, mAccount), FileDetailFragment.FTAG); \r
+                transaction.replace(R.id.fragment, new PreviewMediaFragment(file, mAccount), FileDetailFragment.FTAG); \r
                 transaction.commit();\r
                 mWaitingToPreview = false;\r
             }\r