public class BoxPreviewActivityImpl extends java.lang.Object implements BoxPreviewFragment.Listener
| Modifier and Type | Field and Description |
|---|---|
protected BoxPreviewViewPager |
mBoxViewPager |
protected boolean |
mInImmersiveMode
Flag indicating whether the user is in interactive mode
|
protected PreviewController |
mPreviewController |
protected android.view.ViewGroup |
mRoot |
protected android.support.v7.widget.Toolbar |
mToolbar |
protected android.view.ViewGroup |
mToolBarContainer |
| Constructor and Description |
|---|
BoxPreviewActivityImpl(android.support.v7.app.AppCompatActivity activity,
android.os.Bundle savedInstanceState) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canChangeMenuItemVisibility() |
protected BoxPreviewFragment |
getCurrentPreviewFragment() |
<T extends PreviewController & java.io.Serializable> |
getPreviewController() |
void |
hideAndAnimateToolbar()
Hide toolbar and perform animation
|
void |
inflateMenu(android.view.Menu menu) |
protected void |
initView() |
protected void |
initViewPager() |
boolean |
isPagingEnabled()
Returns whether or not the particular preview implementation can be paged through.
|
<T extends PreviewController & java.io.Serializable> |
loadContent(T previewController,
com.box.androidsdk.content.models.BoxFile file,
com.box.androidsdk.content.models.BoxIteratorItems items) |
boolean |
onBackPressed()
Returns true if back press is consumed by the current fragment
|
void |
onDestroy() |
void |
onError(java.lang.Exception e) |
void |
onFragmentLoaded(BoxPreviewFragment fragment) |
void |
onFragmentScrolled() |
void |
onFragmentTapped() |
void |
onFragmentUnloaded(BoxPreviewFragment fragment) |
void |
onFragmentVisible(BoxPreviewFragment fragment) |
boolean |
onOptionsItemSelected(android.view.MenuItem item) |
void |
onPause() |
boolean |
onPrepareOptionsMenu(android.view.Menu menu) |
void |
onRestoreInstanceState(android.os.Bundle savedInstanceState) |
void |
onResume() |
void |
saveInstanceState(android.os.Bundle outState) |
void |
showAndAnimateToolbar()
Show toolbar and perform animation
|
boolean |
supportsImmersiveMode()
Returns whether or not the particular preview implementation should be immersive ie.
|
void |
toggleInteractiveMode()
Toggles interactive mode.
|
void |
updateTitle(BoxPreviewFragment fragment)
Updates the toolbar title based on what is currently in view
|
protected BoxPreviewViewPager mBoxViewPager
protected PreviewController mPreviewController
protected android.view.ViewGroup mToolBarContainer
protected android.support.v7.widget.Toolbar mToolbar
protected android.view.ViewGroup mRoot
protected boolean mInImmersiveMode
public BoxPreviewActivityImpl(android.support.v7.app.AppCompatActivity activity,
android.os.Bundle savedInstanceState)
protected void initView()
public <T extends PreviewController & java.io.Serializable> void loadContent(T previewController, com.box.androidsdk.content.models.BoxFile file, com.box.androidsdk.content.models.BoxIteratorItems items)
public void toggleInteractiveMode()
public void showAndAnimateToolbar()
public void hideAndAnimateToolbar()
public void updateTitle(BoxPreviewFragment fragment)
fragment - the fragment to update title for.public void inflateMenu(android.view.Menu menu)
protected void initViewPager()
public void onFragmentVisible(BoxPreviewFragment fragment)
onFragmentVisible in interface BoxPreviewFragment.Listenerpublic void onFragmentLoaded(BoxPreviewFragment fragment)
onFragmentLoaded in interface BoxPreviewFragment.Listenerpublic void onFragmentUnloaded(BoxPreviewFragment fragment)
onFragmentUnloaded in interface BoxPreviewFragment.Listenerpublic void onFragmentTapped()
onFragmentTapped in interface BoxPreviewFragment.Listenerpublic void onFragmentScrolled()
onFragmentScrolled in interface BoxPreviewFragment.Listenerpublic void onError(java.lang.Exception e)
onError in interface BoxPreviewFragment.Listenerpublic void onPause()
public void onResume()
public boolean isPagingEnabled()
protected BoxPreviewFragment getCurrentPreviewFragment()
public boolean supportsImmersiveMode()
public <T extends PreviewController & java.io.Serializable> T getPreviewController()
public boolean onOptionsItemSelected(android.view.MenuItem item)
public void saveInstanceState(android.os.Bundle outState)
public boolean onPrepareOptionsMenu(android.view.Menu menu)
public boolean canChangeMenuItemVisibility()
public boolean onBackPressed()
public void onRestoreInstanceState(android.os.Bundle savedInstanceState)
public void onDestroy()