title: How to get or compute the width/height of an inflated view
body: <p>How do I compute the width and height of an inflated View if the parent is a PopupWindow, not a ViewGroup? I cannot use <code>LayoutInflator.inflate(int resId, ViewGroup parent, attachToRoot boolean)</code> because PopupWindow is not a ViewGroup, so I use <code>LayoutInflator.inflate(int resId)</code> instead, but after that I getWidth() and getHeight() return zero :(</p>
  
  <p>I need to resize the PopupWindow to fit the View, but cannot do so until the View has a parent. Do I have a chicken-and-egg problem?</p>
  
  <p>By the way the View is a subclass of RelativeView so calculating it manually is essentially out of the question.</p>
  
  <p>Thanks in advance,
  Barry</p>