利用layoutparams修改view的位置
WindowManager.LayoutParams p = (WindowManager.LayoutParams) view.getLayoutParams();
p.x=dx;
p.y=dy;
WindowManager mWindowManager = (WindowManager)getApplicationContext().getSystemService(Context.WINDOW_SERVICE);
mWindowManager.updateViewLayout(view, p);
详见popupwindow.update(int int int int)方法