- * Opens the image gallery showing the image {@link OCFile} received as parameter.
- *
- * @param file Image {@link OCFile} to show.
- */
- @Override
- public void startImagePreview(OCFile file) {
- Intent showDetailsIntent = new Intent(this, PreviewImageActivity.class);
- showDetailsIntent.putExtra(EXTRA_FILE, file);
- showDetailsIntent.putExtra(EXTRA_ACCOUNT, getAccount());
- startActivity(showDetailsIntent);
- }
-
- /**
- * Stars the preview of an already down media {@link OCFile}.
- *
- * @param file Media {@link OCFile} to preview.
- * @param startPlaybackPosition Media position where the playback will be started, in milliseconds.
- * @param autoplay When 'true', the playback will start without user interactions.
- */
- @Override
- public void startMediaPreview(OCFile file, int startPlaybackPosition, boolean autoplay) {
- Fragment mediaFragment = new PreviewMediaFragment(file, getAccount(), startPlaybackPosition, autoplay);
- setSecondFragment(mediaFragment);
- updateFragmentsVisibility(true);
- updateNavigationElementsInActionBar(file);
- setFile(file);
- }
-
- /**
- * Requests the download of the received {@link OCFile} , updates the UI
- * to monitor the download progress and prepares the activity to preview
- * or open the file when the download finishes.
- *
- * @param file {@link OCFile} to download and preview.
- */
- @Override
- public void startDownloadForPreview(OCFile file) {
- Fragment detailFragment = new FileDetailFragment(file, getAccount());
- setSecondFragment(detailFragment);
- mWaitingToPreview = file;
- requestForDownload();
- updateFragmentsVisibility(true);
- updateNavigationElementsInActionBar(file);
- setFile(file);
- }
-
-
- /**