lkeitht

onPanListener issues after sdk update from 10.1.1 to 10.2.3

Discussion created by lkeitht on May 20, 2014
Latest reply on May 22, 2014 by sgill-esristaff
We were using postPointerUp to update a textview after the user panned, which is working good in our released app (still running 10.1.1 sdk).  Since that version, the only changes I've made was to update the sdk to 10.2.3, add the line to setClientID and changed several values that control whether the app is hitting our prod or development API server.  postPointerUp is no longer being called and prePointerUp is not being called reliably.  I've tried this on a physical device running android 2.3.3 and an emulator running android 4.3.  I stripped all of our code out of the onPanListener and replaced it with Log.d statements, which confirms that pre and post pointer move are getting called reliably, prepointerup is getting called sometime and postpointerup is never getting called.  I also stripped out our onSingleTapListener, which had no effect.

Here's our onstatuschangedlistener, where the onpanlistener is set:
  mMapView.setOnStatusChangedListener(new OnStatusChangedListener() {

   private static final long serialVersionUID = 1L;

   public void onStatusChanged(Object source, STATUS status) {
    
    if (source == mMapView && status == STATUS.INITIALIZED) {
     
     mMapView.setOnPanListener(new OnPanListener() {

      @Override
      public void postPointerMove(float arg0, float arg1, float arg2,
        float arg3) {
       Log.d("pointertest", "in postPointerMove");
      }

      @Override
      public void postPointerUp(float arg0, float arg1, float arg2,
        float arg3) {
       Log.d("pointertest", "in postPointerUp");

      }

      @Override
      public void prePointerMove(float arg0, float arg1, float arg2,
        float arg3) {
       Log.d("pointertest", "in prePointerMove");

      }

      @Override
      public void prePointerUp(float arg0, float arg1, float arg2,
        float arg3) {
       Log.d("pointertest", "in prePointerUp");

      }
     
     });

    }

   }
  });


When I test it, logcat shows alternating "in prepointerMove" and "in postpointermove" while I'm panning, and sometimes shows a "in prepointerup" when I stop panning, but I have yet to see a single "in postpointerup".

Any ideas whats going on?  The api reference for onpanlistener is pretty sparse and doesn't mention any new requirements.

Outcomes