I use the following code to see whether the code runs on a small screen. This works fine in the emulator. However when the code runs on a HTC WildFire it fails.
DisplayMetrics dm = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(dm);
if (dm.heightPixels==320 && dm.widthPixels==240){
/* Here code for small screens */
}
Does anyone has an idea why??
Thanks in advance Jasper