sendmessage_linearlayout为目标控件
popupWindow:自定义的popupWindow
控件之上:
popupWindow.showAtLocation(sendmessage_linearlayout, Gravity.NO_GRAVITY
,location[0],location[1] - popupWindow.getHeight());
控件之下:
popupWindow.showAtLocation(sendmessage_linearlayout, Gravity.NO_GRAVITY
,location[0],location[1] +popupWindow.getHeight());
控件之左:
popupWindow.showAtLocation(sendmessage_linearlayout, Gravity.NO_GRAVITY
,location[0] - popupWindow.getWidth()/2,location[1] );
控件之右:
popupWindow.showAtLocation(sendmessage_linearlayout, Gravity.NO_GRAVITY
,location[0] + popupWindow.getWidth()/2,location[1] );
中上:
popupWindow.showAtLocation(sendmessage_linearlayout, Gravity.NO_GRAVITY
,location[0] + popupWindow.getWidth()/2,location[1] - popupWindow.getHeight());