Android screen metrics problem - height, width, dpi and textsize
<p>I have two emulators.  If I do a</p>

<pre><code>DisplayMetrics dm = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(dm);
</code></pre>

<p>Then for one dm.densityDpi (and dm.xpdi and dm.ypdi) is 160.  dm.heightpixels in Landscape mode is 800.  The skin is the standard wxga, running Android 3.1.</p>

<p>The other emulator has dm.densityDpi of 240.  dm.heightpixels in Portrait mode is also 800.  The skin is the standard wvga800, running Android 2.3.3 (and also for 2.1.1 with the same specs).</p>

<p>If I have a TextView tv, and do a:</p>

<pre><code>tv.setTextSize(TypedValue.COMPLEX_UNIT_SP, 20);
</code></pre>

<p>On the wxga landscape screen, it displays fine.  On the wvga800 portrait screen, the words go off the screen, horizontally.  The screen is too small to display all the resulting from top to bottom, not left to right. </p>

<p>This doesn't make sense to me.  Why would an emulator with a smaller dpi be able to display more text, when heightPixels is the same for both?  I would have assumed the reverse would be true.</p>
