title: android OnGlobalLayoutListener how to retrieve data
body: <p>I am using OnGlobalLayoutListener. How can I use data from this listener? Especially I need lAngle.</p>
  
  <pre><code>        past_edittext.getViewTreeObserver().addOnGlobalLayoutListener(
              new OnGlobalLayoutListener() {
  
                  @Override
                  public void onGlobalLayout() {
                      int height = past_edittext.getHeight();
                      int width = past_edittext.getWidth();
                      int top = past_edittext.getTop();
                      int left = past_edittext.getLeft();
  
                      // center coordinates of EditText
                      past_edittextX = left + width / 2;
                      past_edittextY = top + height / 2;
                      lAngle = (float) (Math
                              .atan((totalCenterY - past_edittextY)
                                      / (totalCenterX - past_edittextX)) * 180 / Math.PI);
                  }
              });
  </code></pre>