|
@ -5466,13 +5466,15 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
|
5466
|
5466
|
case MotionEvent.ACTION_DOWN:
|
5467
|
5467
|
mPosX = motionEvent.getX();
|
5468
|
5468
|
mPosY = motionEvent.getY();
|
|
5469
|
mCurPosX = 0;
|
|
5470
|
mCurPosY = 0;
|
5469
|
5471
|
break;
|
5470
|
5472
|
case MotionEvent.ACTION_MOVE:
|
5471
|
5473
|
mCurPosX = motionEvent.getX();
|
5472
|
5474
|
mCurPosY = motionEvent.getY();
|
5473
|
5475
|
break;
|
5474
|
5476
|
case MotionEvent.ACTION_UP:
|
5475
|
|
if (mCurPosY > mPosY && Math.abs(mCurPosY - mPosY) > 25) { // 向下滑动
|
|
5477
|
if (mCurPosY != 0 && mCurPosY > mPosY && Math.abs(mCurPosY - mPosY) > 25) { // 向下滑动
|
5476
|
5478
|
// 取消气泡选中状态
|
5477
|
5479
|
if (nMarker != null) {
|
5478
|
5480
|
nMarker.hideInfoWindow();
|
|
@ -5501,12 +5503,12 @@ public class MainMapActivity extends Activity implements LocationSource, AMapLoc
|
5501
|
5503
|
rl_control.setVisibility(View.VISIBLE);
|
5502
|
5504
|
}
|
5503
|
5505
|
}, 500);
|
5504
|
|
} else if (mCurPosY < mPosY && Math.abs(mCurPosY - mPosY) > 25) { // 向上活动
|
5505
|
|
|
5506
|
|
} else if (mCurPosX > mPosX && Math.abs(mCurPosX - mPosX) > 25) { // 向右滑动
|
5507
|
|
|
5508
|
|
} else if (mCurPosX < mPosX && Math.abs(mCurPosX - mPosX) > 25) { // 向左滑动
|
5509
|
|
|
|
5506
|
} else if (mCurPosY != 0 && mCurPosY < mPosY && Math.abs(mCurPosY - mPosY) > 25) { // 向上活动
|
|
5507
|
System.out.println("up");
|
|
5508
|
} else if (mCurPosX != 0 && mCurPosX > mPosX && Math.abs(mCurPosX - mPosX) > 25) { // 向右滑动
|
|
5509
|
System.out.println("right");
|
|
5510
|
} else if (mCurPosX != 0 && mCurPosX < mPosX && Math.abs(mCurPosX - mPosX) > 25) { // 向左滑动
|
|
5511
|
System.out.println("left");
|
5510
|
5512
|
} else { // 点击事件
|
5511
|
5513
|
Intent intent = new Intent(getApplication(), NewZhanDetailsActivity.class);
|
5512
|
5514
|
intent.putExtra("zhan_id", id);
|