title: Android Popup Window X and Y positioning
body: <p>I have a popup window in android 
  Any body can say me the X and Y positon mean in an android screen.Is it refer to the screen window or refer to the button poping the window. This is My code</p>
  
  <pre><code>       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);
  </code></pre>