Call a function based on the device's screen size (hdpi/ldpi/mdpi)
<p>On mdpi device I would like to call this method:</p>

<pre><code>final float scale = getResources().getDisplayMetrics().density;
double height_px =  45 * scale + 0.5;
</code></pre>

<p>but I want to ignore the method when the app is run on hdpi devices, how am I able to determine the screen size on my class?</p>
