I'm using PopupWindow class to show a popup above a view. In this popup, I set a contentview with a navigate (a triangle show the position of a clicked view).
The image can be demonstrated as below:
***************
* popup *
*** *********
* *
*
*******
*view *
*******
I want to display the triangle to correct position (the center X of the view), My formule is:
The X triangle offset = viewLeft - popupLeft.
I can calculate the view left but can not calculate the popup left. The getLocationOnScreen return 0 because the popup is not rendered.
Do you have any idea?. Please share. Thanks. :d