public class BoxPreviewDocumentFragment extends BoxPreviewDefaultFragment
| Modifier and Type | Class and Description |
|---|---|
class |
BoxPreviewDocumentFragment.TrackingProgressListener |
BoxPreviewFragment.BoxPreviewController, BoxPreviewFragment.Listener| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
METADATA_DOCUMENT_TAG |
mIsErrorShowing, mReportsTransferBytesEXTRA_BOX_ITEM, EXTRA_POSITION, EXTRA_PREVIEW_LOADED, EXTRA_THUMBNAIL_LOADED, MANDATORY_BOX_FILE_FIELDS, mController, mPosition, mPreviewLoaded, mReceiver, mThumbnailLoaded, TAG| Constructor and Description |
|---|
BoxPreviewDocumentFragment() |
| Modifier and Type | Method and Description |
|---|---|
PdfActivityConfiguration |
buildViewConfiguration(java.lang.String key)
Method used by the PSPDFKit native libraries to return the appropriate view configurations
|
static BoxRequestsPreview.DownloadPreview |
getCachePreviewRequest(PreviewController previewController,
BoxFile boxFile) |
PdfFragment |
getPdfFragment() |
boolean |
isProgressBarVisible() |
void |
loadContent(BoxExecutor executor,
java.util.Collection<java.util.concurrent.FutureTask> tasks,
PreviewStorage storage) |
protected void |
onBoxRequestError(BoxResponse response) |
protected void |
onBoxRequestSuccess(BoxResponse response) |
android.view.View |
onCreateView(android.view.LayoutInflater inflater,
android.view.ViewGroup container,
android.os.Bundle savedInstanceState) |
void |
onDestroy() |
void |
onDocumentLoaded() |
void |
onTaskCompleted(java.util.concurrent.FutureTask task,
java.util.Collection<java.util.concurrent.FutureTask> tasks,
PreviewStorage storage) |
protected void |
restartDownload()
Logic to handle a restarted download, such as resetting requests, adding progress bars,
and removing default views.
|
void |
setDocumentListener(DocumentListener documentListener) |
void |
showUnavailable(java.lang.String message)
Logic to handle unavailable previews, such as removing progress bars and showing default
views.
|
protected void |
updateProgress(long bytesLoaded,
long totalBytes) |
getProgressBar, getVisibleViews, hideError, hideProgress, initDefaultViews, isContainerVisible, onActivityCreated, onCreate, onSaveInstanceState, onStart, restoreStatus, setProgress, showProgresscancelLoadContent, checkTasksBeforeExecute, checkTasksBeforeExecute, createInstance, execute, getBoxFile, getBoxSession, getIntentFilter, getPosition, getPreviewController, handleMessage, isContentLoading, loadContent, notifyFragmentLoaded, notifyFragmentUnloaded, onDetach, onInternetConnectionChanged, onPause, onResume, setPreviewController, setUserVisibleHint, showNetworkUnavailablepublic static final java.lang.String METADATA_DOCUMENT_TAG
@Nullable
public android.view.View onCreateView(android.view.LayoutInflater inflater,
android.view.ViewGroup container,
android.os.Bundle savedInstanceState)
onCreateView in class BoxPreviewDefaultFragmentprotected void onBoxRequestSuccess(BoxResponse response)
onBoxRequestSuccess in class BoxPreviewDefaultFragmentprotected void onBoxRequestError(BoxResponse response)
onBoxRequestError in class BoxPreviewDefaultFragmentpublic void onTaskCompleted(java.util.concurrent.FutureTask task,
java.util.Collection<java.util.concurrent.FutureTask> tasks,
PreviewStorage storage)
onTaskCompleted in class BoxPreviewFragmentprotected void restartDownload()
BoxPreviewFragmentrestartDownload in class BoxPreviewDefaultFragmentpublic void showUnavailable(java.lang.String message)
BoxPreviewFragmentshowUnavailable in class BoxPreviewDefaultFragmentmessage - message to show when handling this error case.public void loadContent(BoxExecutor executor, java.util.Collection<java.util.concurrent.FutureTask> tasks, PreviewStorage storage)
loadContent in class BoxPreviewDefaultFragmentprotected void updateProgress(long bytesLoaded,
long totalBytes)
public static BoxRequestsPreview.DownloadPreview getCachePreviewRequest(PreviewController previewController, BoxFile boxFile)
public PdfActivityConfiguration buildViewConfiguration(java.lang.String key)
key - the library keypublic PdfFragment getPdfFragment()
public void setDocumentListener(DocumentListener documentListener)
public void onDocumentLoaded()
public void onDestroy()
onDestroy in class BoxPreviewFragmentpublic boolean isProgressBarVisible()