title: Android PopupWindow and WRAP_CONTENT don't work together
body: <p>I open a popu window like this:</p>
  
  <pre><code>mInfoPopup = new PopupWindow(layout, 400, 600, true);
  mInfoPopup.setWindowLayoutMode(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
  </code></pre>
  
  <p>The window then gets the exact size specified (400x600) and does NOT adjust its size to its content. What do I need to change so that the popup window will actually wrap around its contents?</p>