我使用android canvas绘制地图(在 ondraw(Canvas canvas))回调方法), 我的要求是我想要打开pop-overview,每当用户触摸地图的任何节点时我们都应该记住pop-overview是在画布前面打开的,我们已经通过 canvas.drawrect()绘制了多个节点
答案 0 :(得分:0)
WindowManager.LayoutParams wmlp = dialog.getWindow().getAttributes();
int x,y;
wmlp.gravity = Gravity.TOP | Gravity.LEFT;
wmlp.x = x; // x position
wmlp.y = y; // y position
// Code for fetching the Coordinates of x,y.