コード例 #1
0
 /** Called whenever the host activity is started. */
 public void onStart() {
   if (mFullscreenManager != null) {
     mLastContentOffset = mFullscreenManager.getContentOffset();
     mLastVisibleContentOffset = mFullscreenManager.getVisibleContentOffset();
     mFullscreenManager.addListener(this);
   }
   requestRender();
 }
コード例 #2
0
 /**
  * Sets a fullscreen handler.
  *
  * @param fullscreen A fullscreen handler.
  */
 public void setFullscreenHandler(ChromeFullscreenManager fullscreen) {
   mFullscreenManager = fullscreen;
   if (mFullscreenManager != null) {
     mLastContentOffset = mFullscreenManager.getContentOffset();
     mLastVisibleContentOffset = mFullscreenManager.getVisibleContentOffset();
     mFullscreenManager.addListener(this);
   }
   propagateViewportToLayouts(getWidth(), getHeight());
 }