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 android.view.ViewGroup |
mRoot |
protected Toolbar |
mToolbar |
protected android.view.ViewGroup |
mToolBarContainer |
| Constructor and Description |
|---|
BoxPreviewActivityImpl(AppCompatActivity activity,
android.os.Bundle savedInstanceState) |
| Modifier and Type | Method and Description |
|---|---|
protected BoxPreviewFragment |
getCurrentPreviewFragment() |
<T extends PreviewStorage & java.io.Serializable> |
getPreviewStorage() |
void |
inflateMenu(android.view.Menu menu) |
protected void |
initToolbar()
Helper method to initialize the activity with the default toolbar for the Share SDK.
|
protected void |
initView() |
protected void |
initViewPager() |
void |
loadContent(BoxSession session,
PreviewStorage previewStorage,
BoxFile file,
BoxListItems 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 |
setTitle(BoxPreviewFragment fragment)
Updates the toolbar title based on the current fragment
|
void |
showToolbar(boolean show)
Sets whether the activity is in interactive mode.
|
boolean |
supportsImmersiveMode()
Returns whether or not the particular preview implementation should be immersive ie.
|
void |
toggleInteractiveMode()
Toggles interactive mode.
|
protected BoxPreviewViewPager mBoxViewPager
protected android.view.ViewGroup mToolBarContainer
protected Toolbar mToolbar
protected android.view.ViewGroup mRoot
protected boolean mInImmersiveMode
public BoxPreviewActivityImpl(AppCompatActivity activity,
android.os.Bundle savedInstanceState)
protected void initView()
public void loadContent(BoxSession session,
PreviewStorage previewStorage,
BoxFile file,
BoxListItems items)
protected void initToolbar()
public void toggleInteractiveMode()
public void showToolbar(boolean show)
show - whether the activity should be in interactive modepublic void setTitle(BoxPreviewFragment fragment)
fragment - fragment currently being usedpublic 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()
protected BoxPreviewFragment getCurrentPreviewFragment()
public boolean supportsImmersiveMode()
public <T extends PreviewStorage & java.io.Serializable> T getPreviewStorage()
public boolean onOptionsItemSelected(android.view.MenuItem item)
public void saveInstanceState(android.os.Bundle outState)
public boolean onPrepareOptionsMenu(android.view.Menu menu)
public boolean onBackPressed()
public void onRestoreInstanceState(android.os.Bundle savedInstanceState)
public void onDestroy()