How to specify height of view to be 1/3 of screen height
<p>I have created a view (actually a webview):</p>

<pre><code>&lt;WebView
  android:id="@+id/myWebView"
  android:layout_width="match_parent"
  android:layout_height="@dimen/input_height"
/&gt;
</code></pre>

<p>Which refers to the height in another xml file:</p>

<pre><code>&lt;resources&gt;
    &lt;dimen name="key_height"&gt;50dip&lt;/dimen&gt;
    &lt;dimen name="candidate_font_height"&gt;16sp&lt;/dimen&gt;
    &lt;dimen name="candidate_vertical_padding"&gt;6sp&lt;/dimen&gt;
    &lt;dimen name="input_height"&gt;280dip&lt;/dimen&gt;
&lt;/resources&gt;
</code></pre>

<p>Where I have set the <code>input_height</code> as <code>280dip</code> which I understand to mean 280 pixels (device independently) of an approximately 320 pixel (or emulated 320ish pixel) height.</p>

<p>On my two devices (small sony ericsson xperia x10 mini with 320 pixel screen, and old htc desire), it works fine, providing a view height of approximately 1.3 of the screen height. One of my testers is using a samsung galaxy S and they are reporting that the view takes up more than the entire screen.</p>

<p>I assume the issue is something to do with screen density, but I thought using <code>dip</code> would circumvent that issue.</p>

<p>How should I define my layout view to avoid this problem?</p>
