コード例 #1
0
 protected void didEnd() {
   if (mView != null) {
     mView.setLocked(false);
     mView = null;
   }
   mTransition = null;
 }
コード例 #2
0
  @Override
  public void load(PLIView view, PLITransition transition, float initialPitch, float initialYaw) {
    if (view != null && (mURL != null || mJSONData != null)) {
      mView = view;
      mTransition = transition;
      mInitialPitch = initialPitch;
      mInitialYaw = initialYaw;
      mIsPreloadingImages = true;
      mKeepParameters = null;
      view.setLocked(true);
      PLLoaderListener internalListener = this.getInternalListener(), listener = this.getListener();
      if (internalListener != null) internalListener.didBegin(this);
      if (listener != null) listener.didBegin(this);
      this.requestJSON(
          new PLFileDownloaderListener() {
            @Override
            public void didBeginDownload(String url, long startTime) {}

            @Override
            public void didProgressDownload(String url, int progress) {}

            @Override
            public void didStopDownload(String url) {}

            @Override
            public void didEndDownload(String url, byte[] data, long elapsedTime) {
              parseJSON(data);
            }

            @Override
            public void didErrorDownload(String url, String error, int responseCode, byte[] data) {
              didError(new Exception(error));
            }
          });
    }
  }