Why does my FrameLayout halve width and height of its child views?
<p>I have a custom webview loading ads from an ad server and then being displayed in a framelayout.</p>

<p>It pulls a 320x50 template, so I set the size of the webview to 320x50 like this:</p>

<pre><code>    FrameLayout.LayoutParams resize = new FrameLayout.LayoutParams(destination.getLayoutParams());

    resize.height=ad.getHeight(); //returns 50
    resize.width=ad.getWidth(); //returns 320
    resize.gravity=Gravity.CENTER;
    this.setLayoutParams(resize);
</code></pre>

<p>For some reason, a quarter of the webview is displayed (the height and width are half and half).</p>

<p>The framelayout is 50px tall, so the webview should fill it, which, as you can see below, it does not. (Pardon the landscape image rotated).
<img src="http://i.imgur.com/h1imF.png" alt="1">
The framelayout is at the top of the screen (left in this image)
The webview has the grey template in it.</p>
