Beispiel #1
0
 @Override
 protected void onScrollChanged(int l, int t, int oldl, int oldt) {
   super.onScrollChanged(l, t, oldl, oldt);
   updateViewport();
   if (mShouldRenderWhilePanning) {
     requestRender();
   } else {
     requestThrottledRender();
   }
 }
Beispiel #2
0
 @Override
 public void onScaleChanged(float scale, float previous) {
   super.onScaleChanged(scale, previous);
   mDetailLevelManager.setScale(scale);
   mHotSpotManager.setScale(scale);
   mTileCanvasViewGroup.setScale(scale);
   mScalingLayout.setScale(scale);
   mCompositePathView.setScale(scale);
   mMarkerLayout.setScale(scale);
   mCalloutLayout.setScale(scale);
 }
Beispiel #3
0
 @Override
 public void onRestoreInstanceState(Parcelable state) {
   final SavedState ss = (SavedState) state;
   super.onRestoreInstanceState(ss.getSuperState());
   setScale(ss.mScale);
   post(
       new Runnable() {
         @Override
         public void run() {
           scrollToAndCenter(ss.mSavedCenterX, ss.mSavedCenterY);
         }
       });
 }
Beispiel #4
0
 @Override
 protected void onLayout(boolean changed, int l, int t, int r, int b) {
   super.onLayout(changed, l, t, r, b);
   updateViewport();
   requestRender();
 }
Beispiel #5
0
 /**
  * Defines the total size, in pixels, of the tile set at 100% scale. The TileView wills pan within
  * it's layout dimensions, with the content (scrollable) size defined by this method.
  *
  * @param width Total width of the tiled set.
  * @param height Total height of the tiled set.
  */
 @Override
 public void setSize(int width, int height) {
   super.setSize(width, height);
   mDetailLevelManager.setSize(width, height);
   mCoordinateTranslater.setSize(width, height);
 }