나는 안드로이드에 팝업 창이있다 어떤 몸이라도 안드로이드 화면에서 X와 Y의 위치를 나에게 말할 수있다. 그것은 스크린 윈도우를 참조하거나 윈도우를 띄우는 버튼을 참조한다. 이것은 내 코드입니다안드로이드 팝업 윈도우 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);
버튼을 사용하여 앵커의 위치를 검색 할 수 있습니다. 버튼의 위치를 나타내는 버튼이 표시되면 어떻게해야합니까? – UsErStackOverFlow
예, 이번에는 기본 주소 wud가 버튼 좌표가됩니다 .. –