You can use PopupWindow
. Use PopupWindow#showAtLocation (View parent, int gravity, int x, int y)
method to put your popup where you want it, using your view itself as the parent.
So, inside your View
's onTouchEvent, you could have:
View view = inflate(R.layout.my_popup_view, null); // however you'll inflate your view
PopupWindow popup = new PopupWindow(view, 300, 300, true);
popup.showAtLocation(this, Gravity.LEFT, x, y);
or something similar.