A question about android

240
0
08-12-2011 09:15 PM
gyy
by
New Contributor
Hey there.

The code is as follow.
public class CustomTouchListener extends MapOnTouchListener{
       .......

public CustomTouchListener(Context arg0, MapView arg1) {
  super(arg0, arg1);
  // TODO Auto-generated constructor stub
}


@Override

public boolean onSingleTap(MotionEvent e) {

  .....
}


@Override

public boolean onDragPointerMove(MotionEvent from, MotionEvent to) {
                .....
}

@Override

public boolean onDragPointerUp(MotionEvent from, MotionEvent to) {

  .....


}


CustomTouchListener myfillListener = new CustomTouchListener(Vars.mainactivity, Vars.mapview);
mapview.setOnTouchListener(myfillListener);

Question:
I can draw polyline or polygon(point is OK),It really works.And I want to stop drawing,so

mapview.setOnTouchListener(null);

but I couldn't click and drag map any more.help me.

Thank you in advance.
0 Kudos
0 Replies