title: PopupWindow Width and Height
body: <p>OK, so I am starting to get a hang of building Android apps, well at least as much a programmer can after a few days - I am proud of what I have learned so far.</p>
  
  <p>Anyways, I want to force login on the main activity - this I am doing by fetching a SharedPrefernece and than checking if that piece of information is null and than getting a PopupWindow which holds the "login" fields and options.</p>
  
  <p>This PopupWindow has a Flipper inside, which is fine and I got working fine when the certain options are choosen.</p>
  
  <p>I am having problems displaying this PopupWindow to just be the size of the content (wrap_content) as when I set the PopupWindow.setAtLocation()</p>
  
  <p>Now, here is what I have been trying to do to get the size of the popup - as mentioned a few times on here:</p>
  
  <pre><code>popup.measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED);
  final PopupWindow pw = new PopupWindow(popup,popup.getMeasuredHeight(),popup.getMeasuredWidth(), true);
  </code></pre>
  
  <p>Note that popup is the inflator of the actual layout of the Popup, pw is the actual PopupWindow object.</p>
  
  <p>Now, I want to get the actual size of just the popup window (so that way it isn't streched out over the page, but rather just in the center looking like a normal popup should.</p>
  
  <p>Also, with the ViewFlipper. I want it to update the size of the popup when it switch pages (so the page should be sizing up and down per page) is there a way to make this work as well? I tried pw.update() but that didn't work out very well.</p>