我在android中有一个弹出窗口任何人都可以说我在android屏幕中的X和Y位置意味着它是指屏幕窗口还是指弹出窗口的按钮。这是我的代码
int[] location = new int[2];
Object position = null;
Object currentRowId = position;
View currentRow = v;
v.getLocationOnScreen(location);
Point point = new Point();
point.x = location[0];
point.y = location[1];
PopupWindow changeStatusPopUp = new PopupWindow(context);
changeStatusPopUp.setContentView(layout);
changeStatusPopUp.setWidth(165);
changeStatusPopUp.setHeight(LinearLayout.LayoutParams.WRAP_CONTENT);
changeStatusPopUp.setFocusable(true);
int OFFSET_X = -80;
int OFFSET_Y = 50;
changeStatusPopUp.setBackgroundDrawable(new BitmapDrawable());
changeStatusPopUp.showAtLocation(layout, Gravity.NO_GRAVITY, p.x +
OFFSET_X, p.y + OFFSET_Y);