title: What listener would tell me that when the drawing of a view has finished so i can get height of the view?
body: <p>I am programmatically adding a view to the Layout and after i add that i need to get the height of new view when i ask for height of new view simply i get 0. Is there any way to know when a view has finished drawing and it can provide its height ?</p>
  
  <p>To be more clear i am adding a AdVhirlLayout to the my root layout with <code>myMainLayout.addView(adWhirlLayout, 0, adLayoutparams);</code> the next line is <code>adWhirlLayout.getHeight();</code>
   which retruns 0. I have added <code>OnHierarchyChangeListener</code>to the adWhirlLayout and i am trying to get the height of the adWhirlLayout but still it returns 0. There must be another listener which will let me know if the drawing of adWhirlLayout has finished. </p>
  
  <pre><code>adWhirlLayout.setOnHierarchyChangeListener(new OnHierarchyChangeListener() {
  
      @Override
      public void onChildViewRemoved(View parent, View child) {}
  
      @Override
      public void onChildViewAdded(View parent, View child) {
          adWhirlLayout.getHeight();
      }
  });
  </code></pre>