You can use an emulator to see your results for different dpi.
DPI is a measure that you can use on your dimens.xml, and if you have a measure in pixel,you can use this to know which kind of dpi is.
switch (getResources().getDisplayMetrics().densityDpi) {
case DisplayMetrics.DENSITY_LOW:
System.out.println("low");
// ...
break;
case DisplayMetrics.DENSITY_MEDIUM:
System.out.println("medium");
// ...
break;
case DisplayMetrics.DENSITY_HIGH:
System.out.println("high");
// ...
break;
case DisplayMetrics.DENSITY_XHIGH:
System.out.println("xhigh");
// ...
break;
}
For example, Nexus 4 has a density of 320 (xhdpi), Samsung Galaxy SII 240 (hdpi)